Webpack watch server
webpack-watch-server command to add to your package scripts that fires up Webpack in watch mode and restarts your server each build. Webpack and server logs stream in a unified console with clear formatting and pretty colors.
npm install webpack-watch-server
"dev": "webpack-watch-server"to your
package.jsonscripts. To specify a custom Webpack config file path use
webpack-watch-server --config path/to/custom-webpack-config.js. The file will be transpiled with Babel if it’s name ends with
npm run devto start Webpack in watch mode. The server automatically starts and restarts after each build.
- It is assumed your server file is the default Node finds at the Webpack config
- For now, only plain object Webpack configs are supported.
- Node >= 6.4.