-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Get an error if HMR and hot together #2146
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
Comments
Ran into similar issue after upgrading from 4.0.2 to 4.0.3. webpack-dev-server actually checks for this plugin but somehow it failed (https://github.com/webpack/webpack-dev-server/blob/802aa30cc0a549803e64b74a7085a2c549c71f41/lib/utils/updateCompiler.js#L18) |
@jakeNiemiec If you set hmr: true you already have a ‘--hot’, cause |
What issue are you having? We can only fix problems with rails/webpacker here. |
I just sad that you have the flag |
Does removing the HotModuleReplacementPlugin() from your config fix things? |
@jakeNiemiec I don’t have HotModuleReplacementPlugin() in my config, it’s in the config of Webpacker. And I showed in this issue (first post) if you remove appending of HotModuleReplacementPlugin() you fix this error. |
Apologies, the link from @babel92 completely threw me off. How are you invoking webpack with |
Actually I think @a-dev and I are having the same issue - if you set hmr: true in webpacker.yml, webpacker inserts HotModuleReplacementPlugin and uses hot: true to launch webpack-dev-server (which should be equivalent to --hot option). And webpack-dev-server would try to check for this plugin before inserting it again but it failed to identify it somehow in our cases. My suggestion was just don't append this plugin in @rails/webpacker as a-dev already proposed, given webpack-dev-server will do that anyway. |
I submitted a PR to fix this: #2439. |
@gauravtiwari can you reopen: #2439 I think given the docs clearly state that this is correct, we should consider #2439. |
@guillaumebriday Let's close and let somebody reopen if an issue with v6. |
I had an trouble in a project that hotModuleReplacement didn't work, got an error 'Maximum call stack size exceeded'.
It's an old issue that flag --hot and hotModuleReplacement can't be together.
I removed HotModuleReplacementPlugin() form config:
I use last versions:
"webpack": "^4.35.0",
"webpack-dev-server": "^3.7.2",
The text was updated successfully, but these errors were encountered: