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
add output.futureEmitAssets #8642
Conversation
add a new version of emitting assets which allows to free memory of Sources with the trade-off of disallowing reading asset content after emitting It also uses Source.buffer when available.
For maintainers only:
|
Thank you for your pull request! The most important CI builds succeeded, we’ll review the pull request soon. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes the memory issue on our end
When using the flag on a development build, it freezes on |
You don't have to use |
This version (https://github.com/webpack/webpack/releases/tag/v4.29.0) includes a memory leak fix for assets (webpack/webpack#8609, webpack/webpack#8642). Thanks to @Meligy for pinging about this!
This version (https://github.com/webpack/webpack/releases/tag/v4.29.0) includes a memory leak fix for assets (webpack/webpack#8609, webpack/webpack#8642). Thanks to @Meligy for pinging about this!
This version (https://github.com/webpack/webpack/releases/tag/v4.29.0) includes a memory leak fix for assets (webpack/webpack#8609, webpack/webpack#8642). Thanks to @Meligy for pinging about this!
CRA 3 opts-in to a new webpack 5 feature early to save memory: `futureEmitAssets` facebook#6696 This optimization only stores the file sizes during webpack compilation, no longer storing the original source webpack/webpack#8642 This is incompatible with our webpack-dev-server customization setting of `writeToDisk` webpack/webpack#8642 (comment) which tries to read the source after emit, which throws an exception, but that error is swallowed and the `npm start` just hangs. Before we update to webpack 5, where this feature will be the default, we need to stop writing to disk, or find another way to do it than the `writeToDisk` flag.
This version (https://github.com/webpack/webpack/releases/tag/v4.29.0) includes a memory leak fix for assets (webpack/webpack#8609, webpack/webpack#8642). Thanks to @Meligy for pinging about this!
add a new version of emitting assets which allows to free memory of Sources with the trade-off of disallowing reading asset content after emitting
It also uses Source.buffer when available.
What kind of change does this PR introduce?
memory
Did you add tests for your changes?
no (it will be tested in the next branch, when it's on by default)
Does this PR introduce a breaking change?
no
What needs to be documented once your changes are merged?
New option
output.futureEmitAssets
allows to opt-in to the new way of emitting assets which allows to free memory of Sources with the trade-off of disallowing reading asset content after emitting