mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2024-11-10 06:37:45 +01:00
Disable webpack-dev-server polling by default.
This commit is contained in:
parent
d502d9b1bb
commit
da0b4d7911
2 changed files with 9 additions and 2 deletions
|
@ -41,7 +41,14 @@ module.exports = {
|
|||
// serve index.html in place of 404 responses to allow HTML5 history
|
||||
historyApiFallback: true,
|
||||
port: PORT,
|
||||
host: HOST
|
||||
host: HOST,
|
||||
watchOptions: {
|
||||
// Disabled polling by default as it causes lots of CPU usage and hence drains laptop batteries. To enable polling add WEBPACK_DEV_SERVER_POLLING to your environment
|
||||
// See <https://webpack.js.org/configuration/watch/#watchoptions-poll> for details
|
||||
poll: (!!process.env.WEBPACK_DEV_SERVER_POLLING ? true : false),
|
||||
watch: false,
|
||||
ignored: /node_modules/
|
||||
}
|
||||
},
|
||||
plugins: [
|
||||
new webpack.NoErrorsPlugin(),
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
"build": "webpack --config config/webpack.production.config.js --progress --profile --colors",
|
||||
"test": "wdio config/wdio.conf.js",
|
||||
"test-watch": "wdio config/wdio.conf.js --watch",
|
||||
"start": "webpack-dev-server --progress --profile --colors --watch-poll --config config/webpack.config.js",
|
||||
"start": "webpack-dev-server --progress --profile --colors --config config/webpack.config.js",
|
||||
"lint": "eslint --ext js --ext jsx {src,test}",
|
||||
"lint-styles": "stylelint 'src/styles/*.scss'"
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue