diff --git a/snowpack/src/dev/hmr.ts b/snowpack/src/dev/hmr.ts index 62955743f0..51da1efefa 100644 --- a/snowpack/src/dev/hmr.ts +++ b/snowpack/src/dev/hmr.ts @@ -15,7 +15,7 @@ export function startHmrEngine( ) { const {hmrDelay} = config.devOptions; const hmrPort = config.devOptions.hmrPort || serverPort; - const hmrEngine = new EsmHmrEngine({server, port: hmrPort, delay: hmrDelay}); + const hmrEngine = new EsmHmrEngine({server: (hmrPort == serverPort ? server : null) , port: hmrPort, delay: hmrDelay}); onProcessExit(() => { hmrEngine.disconnectAllClients(); });