Have you used AI?
No
Bug Description
tapable@2.3.1 throws uncaught HMR is disabled error in Webpack Dev Server unless devServer.hot is set to false in webpack.config.js.
This is new behaviour in v2.3.1 and not present in v2.3.0 or earlier, which does not require devServer.hot: false to be set (default is true).
Link to Minimal Reproduction and step to reproduce
Repo: https://github.com/mao-sz/tapable-hmr-bug
-
Clone repo and cd into it
-
Run npm i
-
Run npm run dev to start WDS and navigate to the localhost URL
-
Open browser console - observe uncaught error [HMR] Hot Module Replacement is disabled and no console log of foo
-
Checkout to the downgrade-2.3.0 branch
-
Delete node_modules/
-
Re-run npm i - this should install everything the same other than tapable@2.3.0
-
Re-run npm run dev to start WDS and navigate to the localhost URL
-
Open browser console - observe foo is logged and no HMR error is thrown
Expected Behavior
devServer.hot can be omitted i.e. left as default true, and no uncaught HMR error thrown when launching WDS.
Actual Behavior
Uncaught HMR error thrown in browser console when launching WDS and no bundled src JS executed.
Error only resolved if devServer.hot set to false in webpack.config.js which should not be required.
Environment
System:
OS: Linux 6.19 Fedora Linux 43 (KDE Plasma Desktop Edition)
CPU: (16) x64 AMD Ryzen 7 5700X 8-Core Processor
Memory: 24.97 GB / 31.26 GB
Binaries:
Node: 24.12.0 - /home/maoshizhong/.nvm/versions/node/v24.12.0/bin/node
Yarn: 1.22.22 - /usr/bin/yarn
npm: 11.7.0 - /home/maoshizhong/.nvm/versions/node/v24.12.0/bin/npm
Browsers:
Chrome: 146.0.7680.153
Firefox: 148.0.2
Firefox Developer Edition: 148.0.2
Packages:
html-webpack-plugin: ^5.6.6 => 5.6.6
webpack: ^5.105.4 => 5.105.4
webpack-cli: ^7.0.2 => 7.0.2
webpack-dev-server: ^5.2.3 => 5.2.3
Is this a regression?
Yes (please specify version below)
Last Working Version
v2.3.0
Additional Context
No response
Have you used AI?
No
Bug Description
tapable@2.3.1throws uncaughtHMR is disablederror in Webpack Dev Server unlessdevServer.hotis set tofalseinwebpack.config.js.This is new behaviour in v2.3.1 and not present in v2.3.0 or earlier, which does not require
devServer.hot: falseto be set (default istrue).Link to Minimal Reproduction and step to reproduce
Repo: https://github.com/mao-sz/tapable-hmr-bug
Clone repo and
cdinto itRun
npm iRun
npm run devto start WDS and navigate to the localhost URLOpen browser console - observe uncaught error
[HMR] Hot Module Replacement is disabledand no console log offooCheckout to the
downgrade-2.3.0branchDelete
node_modules/Re-run
npm i- this should install everything the same other thantapable@2.3.0Re-run
npm run devto start WDS and navigate to the localhost URLOpen browser console - observe
foois logged and no HMR error is thrownExpected Behavior
devServer.hotcan be omitted i.e. left as defaulttrue, and no uncaught HMR error thrown when launching WDS.Actual Behavior
Uncaught HMR error thrown in browser console when launching WDS and no bundled src JS executed.
Error only resolved if
devServer.hotset tofalseinwebpack.config.jswhich should not be required.Environment
System: OS: Linux 6.19 Fedora Linux 43 (KDE Plasma Desktop Edition) CPU: (16) x64 AMD Ryzen 7 5700X 8-Core Processor Memory: 24.97 GB / 31.26 GB Binaries: Node: 24.12.0 - /home/maoshizhong/.nvm/versions/node/v24.12.0/bin/node Yarn: 1.22.22 - /usr/bin/yarn npm: 11.7.0 - /home/maoshizhong/.nvm/versions/node/v24.12.0/bin/npm Browsers: Chrome: 146.0.7680.153 Firefox: 148.0.2 Firefox Developer Edition: 148.0.2 Packages: html-webpack-plugin: ^5.6.6 => 5.6.6 webpack: ^5.105.4 => 5.105.4 webpack-cli: ^7.0.2 => 7.0.2 webpack-dev-server: ^5.2.3 => 5.2.3Is this a regression?
Yes (please specify version below)
Last Working Version
v2.3.0
Additional Context
No response