Webpack-dev-server: devServer.hot not working.

Created on 19 Oct 2020  路  3Comments  路  Source: webpack/webpack-dev-server

  • Operating System: OSX
  • Node Version: 10.22.0
  • "webpack": "^5.1.0",
  • "webpack-cli": "^4.0.0",
  • "webpack-dev-server": "^3.11.0",
  • [x] This is a bug
  • [ ] This is a modification request

Code

devServer: {
  historyApiFallback: true,
  host: '0.0.0.0',
  port: 8989,
  compress: true,
  noInfo: true,
  useLocalIp: true,
  hot: true,
  open: false
}
"start": "cross-env NODE_ENV=development webpack serve --progress --config webpack.dev.js"

run npm start, hot not working.

Most helpful comment

Set target: "web" will fix your problem.

module.exports = {
  // ...
  target: "web"
};

All 3 comments

Set target: "web" will fix your problem.

module.exports = {
  // ...
  target: "web"
};

Duplicate of #2758.

Duplicate

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Ky6uk picture Ky6uk  路  3Comments

wojtekmaj picture wojtekmaj  路  3Comments

daryn-k picture daryn-k  路  3Comments

nikirossi picture nikirossi  路  3Comments

antoinerousseau picture antoinerousseau  路  3Comments