-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Avoid using unique ID in child compiler template #1836
Avoid using unique ID in child compiler template #1836
Conversation
Thank you |
@alexander-akait @helloitsjoe this change leads to an issue - webpack-dev-server doesn't pick changes:
Rolling back to html-webpack-plugin version 5.5.3 fixes the issue. |
@creage Can you create reproducible test repo? |
@creage Thank you, I will look soon |
@creage I cloned your reproduction repo and it looks like 5.5.4 also has the problem you describe. This change was released in 5.6.0, so it seems likely this is caused by something between 5.5.3 and 5.5.4, unless you're seeing something different. |
@creage Intresting, I would say that we have fixed the bug, before you always had extra compilation and spent extra resources and that is why you have reloading, but when you watch
Because webpack doesn't know how to apply changes. How to fix it:
And now dev server will reload the page when Also you can debug it using:
And you will see that application wasn't changed, because nothing was changed in Feel free to feedback |
@alexander-akait Well, since my app uses a dll, it becomes part of it, and changes to dll are changing my app, which should be reflected by reload. And, it used to work up to 5.5.3. I can watch for manifest, but that’s kinda hacky. |
@creage The manifest is just a file and just a file dependency, changes in dll didn't change your application code (i.e. |
What problem does this solve?
Unique child compiler IDs cause a memory leak in watch mode
Resolves #1835
Details
This change reverts aa64b82, which introduced a change where each child compiler is given a unique ID. This causes duplicate source strings to be cached on every recompile, without removing the old sources.
More details and screenshots in the issue linked above. The main thing I'm unclear about is why unique IDs were used in the first place, but as far as I can tell the ID isn't referenced anywhere else. Let me know if I've missed something!
Testing done
template
instead of the unique ID