You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Webpack5, setting devServer.hot to true will automatically apply HMR plugin.
But in Rspack, setting devServer.hot to true doesn't seem to work, new HotModuleReplacementPlugin() must be added to plugins option to make HMR work properly. However this will result in a warning log: <w> [webpack-dev-server] "hot: true" automatically applies HMR plugin, you don't have to add it manually to your webpack configuration.
The behavior should be consistent, it seems to be a bug.
Reproduce link
No response
Reproduce Steps
1、set devServer.hot to true
2、check if HMR is working
3、add HMR plugin
4、check if HMR is working
5、see dev-server log
The text was updated successfully, but these errors were encountered:
I tried to create a repro, but got the same warning in both rspack-dev-server (pnpm run dev) and webpack-dev-server (pnpm run devw). The class of rspack-dev-server directly inherits from webpack-dev-server, so there should be no differences.
Since the logic of adding the plugin only takes effect when options.webSocketServer is enabled (enabled by default), you can debug whether this configuration is enabled in your scenario.
Hello @Lancernix, sorry we can't investigate the problem further without reproduction demo, please provide a repro demo by forking rspack-repro, or provide a minimal GitHub repository by yourself. Issues labeled by need reproduction will be closed if no activities in 14 days.
System Info
System:
OS: macOS 15.2
CPU: (8) arm64 Apple M1
Memory: 105.83 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.18.0 - ~/.nvm/versions/node/v20.18.0/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 10.8.2 - ~/.nvm/versions/node/v20.18.0/bin/npm
pnpm: 8.15.8 - /usr/local/bin/pnpm
Browsers:
Chrome: 134.0.6998.46
Safari: 18.2
npmPackages:
@rspack/cli: ^1.2.8 => 1.2.8
@rspack/core: ^1.2.8 => 1.2.8
@rspack/plugin-react-refresh: ^1.0.1 => 1.0.1
Details
In Webpack5, setting
devServer.hot
totrue
will automatically apply HMR plugin.But in Rspack, setting
devServer.hot
totrue
doesn't seem to work,new HotModuleReplacementPlugin()
must be added toplugins
option to make HMR work properly. However this will result in a warning log:<w> [webpack-dev-server] "hot: true" automatically applies HMR plugin, you don't have to add it manually to your webpack configuration.
The behavior should be consistent, it seems to be a bug.
Reproduce link
No response
Reproduce Steps
1、set
devServer.hot
totrue
2、check if HMR is working
3、add HMR plugin
4、check if HMR is working
5、see dev-server log
The text was updated successfully, but these errors were encountered: