Skip to content

Commit 2cf2939

Browse files
bdwainSpaceK33z
authored andcommitted
have --open use the options.public path if it exists (#749)
1 parent aa98997 commit 2cf2939

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bin/webpack-dev-server.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,14 +330,14 @@ function startDevServer(wpOpt, options) {
330330
const protocol = options.https ? "https" : "http";
331331

332332
// the formatted domain (url without path) of the webpack server
333-
const domain = url.format({
333+
const domain = options.public ? `${protocol}://${options.public}` : url.format({
334334
protocol: protocol,
335335
hostname: options.host,
336336
port: options.socket ? 0 : options.port.toString()
337337
});
338338

339339
if(options.inline !== false) {
340-
const devClient = [`${require.resolve("../client/")}?${options.public ? `${protocol}://${options.public}` : domain}`];
340+
const devClient = [`${require.resolve("../client/")}?${domain}`];
341341

342342
if(options.hotOnly)
343343
devClient.push("webpack/hot/only-dev-server");

0 commit comments

Comments
 (0)