Use dev-server for hot reload
This commit is contained in:
parent
1d2a11729f
commit
e931866aeb
@ -22,7 +22,7 @@
|
|||||||
"test:browser": "webpack-dev-server --config=webpack.config-browser.js",
|
"test:browser": "webpack-dev-server --config=webpack.config-browser.js",
|
||||||
"test:client": "nyc --nycrc-path=test/.nycrc-mocha-webpack mocha-webpack --colors --opts=test/mocha-webpack.opts",
|
"test:client": "nyc --nycrc-path=test/.nycrc-mocha-webpack mocha-webpack --colors --opts=test/mocha-webpack.opts",
|
||||||
"test:server": "nyc --nycrc-path=test/.nycrc-mocha mocha --colors",
|
"test:server": "nyc --nycrc-path=test/.nycrc-mocha mocha --colors",
|
||||||
"watch": "webpack --watch"
|
"watch": "webpack-dev-server --hot --inline"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"lounge",
|
"lounge",
|
||||||
|
@ -141,6 +141,19 @@ const config = {
|
|||||||
// socket.io uses debug, we don't need it
|
// socket.io uses debug, we don't need it
|
||||||
new webpack.NormalModuleReplacementPlugin(/debug/, path.resolve(__dirname, "scripts/noop.js")),
|
new webpack.NormalModuleReplacementPlugin(/debug/, path.resolve(__dirname, "scripts/noop.js")),
|
||||||
],
|
],
|
||||||
|
devServer: {
|
||||||
|
port: 9001,
|
||||||
|
proxy: {
|
||||||
|
"/": {
|
||||||
|
context: ['**', '!/css/**', '!/js/**'],
|
||||||
|
target: 'http://localhost:9000/',
|
||||||
|
},
|
||||||
|
"/socket.io": {
|
||||||
|
ws: true,
|
||||||
|
target: 'http://localhost:9000',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = config;
|
module.exports = config;
|
||||||
|
Loading…
Reference in New Issue
Block a user