improve compatibility with webpack@5
See original GitHub issuein webpack@5 adding assets on emit hook is deprecated, so it should be improve, we talked with @sokra about migration and compatibility.
You can always get the stats of the current state via compilation.getStats, but I would not consider the stats.json as part of the assets/output files generated by webpack. It should use the done hook and write stats.json directly to the compilation.intermediateFileSystem (instead of the outputFileSystem).
So, we need do migration on done
hook and use compilation.intermediateFileSystem
Thanks for plugin.
P.S. I would also like to say that it is very popular and we would to get it in webpack-contrib
as official plugin, if you interested in this, just say me it and we will start to do it.
Issue Analytics
- State:
- Created 3 years ago
- Comments:21 (18 by maintainers)
Top Results From Across the Web
To v5 from v4 - webpack
Upgrade webpack 4 and its plugins/loaders · Make sure your build has no errors or warnings · Make sure to use mode ·...
Read more >Migrating to webpack 5 to improve build time and reduce ...
After a long time of 2 years, webpack came with its new upgrade i.e. ... So, that every loaders and plugins are compatible...
Read more >Upgrading Webpack 4 → 5 | Square Corner Blog
While looking for ways to reduce bundle size, we discovered that Webpack 5 had improved tree-shaking. We hesitantly ran npm install webpack@ ...
Read more >Webpack 5 Adoption - Next.js
Using webpack 5 in your application has many benefits, notably: Improved Disk Caching: next build is significantly faster on subsequent builds ...
Read more >A mostly complete guide to webpack 5 (2020)
Plugins are third-party extensions that can alter how webpack works. For example there are plugins for extracting HTML, CSS, or for setting ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@ryan-roemer
I think this is good https://github.com/webpack/webpack/blob/master/lib/Compilation.js#L3463
Released in
webpack-stats-plugin@1.0.0
. Thanks for the help @evilebottnawi @sokra !