-
Notifications
You must be signed in to change notification settings - Fork 193
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
Issue with adding/removing hooks when runtimeChunk is true #25
Comments
Actually might not be the issue I thought it was. Getting the error to reproduce pretty much always when |
I think this might be related to #4 |
Ah yeah definitely. Sorry about opening the new issue, wasn't thinking 😅 At least in my config (and the |
@mmhand123 thanks a lot for digging this up! I can confirm that setting |
I can confirm that this is reliably reproducible. I think I also know the culprit, but this will take a bit of time to fix because it is related to how the plugin examine chunks to inject module initialization template conditionally. (createRefreshTemplate.js@L37) It has to be conditional because some plugins, like the HTMLWebpackPlugin, also bundles |
Fixed in |
Thank you!! |
When
runtimeChunks: true
is enabled in the webpack config, I'm running into an issue with gettingRendered more hooks than during the previous render.
(or less, depending on what hooks get added/removed). To reproduce, addoptimization: { runtimeChunks: true }
to the webpack config ofwds-kitchen-sink
, and then add a hook to a functional component, save, and add another, The error should appear.Edit - what I originally thought was incorrect 😦
The text was updated successfully, but these errors were encountered: