Skip to content

Commit

Permalink
fix hmr engine reference in dev (#495)
Browse files Browse the repository at this point in the history
  • Loading branch information
FredKSchott committed Jun 15, 2020
1 parent 2a39016 commit a047967
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/commands/dev.ts
Expand Up @@ -200,10 +200,6 @@ export async function command(commandOptions: CommandOptions) {
const messageBus = new EventEmitter();
const mountedDirectories: [string, string][] = [];

onProcessExit(() => {
hmrEngine.disconnectAllClients();
});

console.log = (...args) => {
messageBus.emit('CONSOLE', {level: 'log', args});
};
Expand Down Expand Up @@ -871,6 +867,9 @@ export async function command(commandOptions: CommandOptions) {
.listen(port);

const hmrEngine = new EsmHmrEngine({server});
onProcessExit(() => {
hmrEngine.disconnectAllClients();
});

// Live Reload + File System Watching
let isLiveReloadPaused = false;
Expand Down

0 comments on commit a047967

Please sign in to comment.