Skip to content

Commit

Permalink
Merge branch 'v2' of github.com:parcel-bundler/parcel into unreachabl…
Browse files Browse the repository at this point in the history
…e-asset
  • Loading branch information
gorakong committed Mar 17, 2021
2 parents eeef08a + dc09f12 commit 9774f40
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/runtimes/hmr/src/HMRRuntime.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,14 @@ export default (new Runtime({
filePath: __filename,
code:
`var HMR_HOST = ${JSON.stringify(host != null ? host : null)};` +
`var HMR_PORT = ${JSON.stringify(port != null ? port : null)};` +
`var HMR_PORT = ${JSON.stringify(
port != null &&
// Default to the HTTP port in the browser, only override
// in watch mode or if hmr port != serve port
(!options.serveOptions || options.serveOptions.port !== port)
? port
: null,
)};` +
`var HMR_SECURE = ${JSON.stringify(
!!(options.serveOptions && options.serveOptions.https),
)};` +
Expand Down

0 comments on commit 9774f40

Please sign in to comment.