webpack@5.74.0
yarn add webpack@5.70.0
...
{
entry: { main: ['./node_modules/webpack/hot/poll?100', ...config.entry.main ] }, //this
externals: [
nodeExternals({
allowlist: ['./node_modules/webpack/hot/poll?100'] // this
})
],
plugins: [
new webpack.HotModuleReplacementPlugin(),
new webpack.WatchIgnorePlugin({ paths: [/\.js$/, /\.d\.ts$/] }),
new RunScriptWebpackPlugin({name: config.output.filename, autoRestart: false}),
],
},
...
"webpackConfig": "apps/project-api/webpack-hmr.config.js"
npx nx build project-api --watch