From bbc931c285d3ceaa01743dc56ef7c96ddf06480f Mon Sep 17 00:00:00 2001 From: antiphoton Date: Thu, 1 Mar 2018 13:10:22 -0600 Subject: [PATCH] fix(dev-server): dev server behind NAT network (#868) (#828)Webpack dev client could not work when server is behind NAT network. Now, the dev client tries to connect to browser's window.location. --- packages/@vue/cli-service/lib/commands/serve.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@vue/cli-service/lib/commands/serve.js b/packages/@vue/cli-service/lib/commands/serve.js index 21805e7f2c..7a7b5aa787 100644 --- a/packages/@vue/cli-service/lib/commands/serve.js +++ b/packages/@vue/cli-service/lib/commands/serve.js @@ -58,7 +58,7 @@ module.exports = (api, options) => { if (!isProduction) { const devClients = [ // dev server client - require.resolve(`webpack-dev-server/client`) + `?${urls.localUrlForBrowser}`, + require.resolve(`webpack-dev-server/client`), // hmr client require.resolve(projectDevServerOptions.hotOnly ? 'webpack/hot/only-dev-server'