Skip to content

Commit

Permalink
feat: 🎸 turn off HMR for custom element
Browse files Browse the repository at this point in the history
  • Loading branch information
mjancarik committed May 28, 2024
1 parent 6b639ed commit 5340b95
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/integration-custom-element/cli/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,15 @@ export default function ({ emitter, EMITTER_EVENTS }) {
},
);

emitter.on(
EMITTER_EVENTS.MERKUR_CONFIG,
function turnOffHMR({ merkurConfig }) {
merkurConfig.HMR = false;

return merkurConfig;
},
);

emitter.on(EMITTER_EVENTS.CLI_CONFIG, function removeNodeTask({ cliConfig }) {
if (cliConfig.runTask.length === 0) {
cliConfig.runTask = ['es13', 'es9'];
Expand Down

0 comments on commit 5340b95

Please sign in to comment.