Skip to content

Commit

Permalink
Add --hmr-host option to set her host (#8101)
Browse files Browse the repository at this point in the history
  • Loading branch information
remotezygote authored May 24, 2022
1 parent 460e786 commit c1f3bb1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/core/parcel/src/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ var hmrOptions = {
'--cert <path>': 'path to certificate to use with HTTPS',
'--key <path>': 'path to private key to use with HTTPS',
'--hmr-port <port>': ['hot module replacement port', process.env.HMR_PORT],
'--hmr-host <host>': ['hot module replacement host', process.env.HMR_HOST],
};

function applyOptions(cmd, options) {
Expand Down Expand Up @@ -446,8 +447,9 @@ async function normalizeOptions(
let hmrOptions = null;
if (command.name() !== 'build' && command.hmr !== false) {
let hmrport = command.hmrPort ? parsePort(command.hmrPort) : port;
let hmrhost = command.hmrHost ? command.hmrHost : host;

hmrOptions = {port: hmrport, host};
hmrOptions = {port: hmrport, host: hmrhost};
}

if (command.detailedReport === true) {
Expand Down

0 comments on commit c1f3bb1

Please sign in to comment.