Hi!
My webpack.config.js
const path = require('path');
module.exports = {
entry: [
'webpack-dev-server/client?https://my.address.com/',
'webpack/hot/only-dev-server',
'./index.js',
],
output: {
filename: "build.js",
path: path.join(__dirname, 'static'),
},
devServer: {
contentBase: path.join(__dirname, 'static'),
proxy: {
'**': {
target: 'https://my.addres.com/t/',
secure: false
}
}
}
}
I work with reversed ssh tunnel like
ssh -v -N -R :9010:localhost:8080 my.address.com
and standard command to run webpack-dev-server npm run: webpack-dev-server
The problem is that I have two initialised WS connections.
First invalid because in my build.js file I found
/* WEBPACK VAR INJECTION */}.call(exports, "?http://localhost:8080"))
and second (correct), pointing to https://my.address.com/.
WS connection should established only once for address I provided.
Webpack: 2.1.0-beta.27
Webpack dev server: 2.1.0-beta.12
When you're using the CLI, it will automatically add "webpack-dev-server/client" for you.
You can do two things:
entry, and run the CLI with webpack-dev-server --public=my.address.com--no-inline to your CLI.Thank you!
Most helpful comment
When you're using the CLI, it will automatically add
"webpack-dev-server/client"for you.You can do two things:
entry, and run the CLI withwebpack-dev-server --public=my.address.com--no-inlineto your CLI.