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.
This commit is contained in:
antiphoton
2018-03-01 13:10:22 -06:00
committed by Evan You
parent e4ff22a4de
commit bbc931c285

View File

@@ -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'