Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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