Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hmr: false does not disable Hot Module Replacement #390

Closed
thedanbob opened this issue Dec 21, 2023 · 2 comments · Fixed by #392
Closed

hmr: false does not disable Hot Module Replacement #390

thedanbob opened this issue Dec 21, 2023 · 2 comments · Fixed by #392
Labels

Comments

@thedanbob
Copy link
Contributor

Starting with version 4, webpack-dev-server defaults to Hot Module Replacement enabled:
https://github.com/webpack/webpack-dev-server/blob/540c43852ea33f9cb18820e1cef05d5ddb86cc3e/CHANGELOG.md?plain=1#L561
https://github.com/webpack/webpack-dev-server/blob/540c43852ea33f9cb18820e1cef05d5ddb86cc3e/lib/Server.js#L1081

Shakapacker assumes the default is disabled: If hmr: true the --hot flag gets added to the webpack-dev-server command, but hmr: false does nothing. To actually disable HMR you must add hot: false to shakapacker.yml or the --no-hot command line flag.

@thedanbob thedanbob added the bug label Dec 21, 2023
@justin808
Copy link
Member

@thedanbob good find. Any chance that you can submit a PR to resolve this?

@thedanbob
Copy link
Contributor Author

Sure thing, I'll work on that later today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants