Open JosephBrooksbank opened 2 years ago
I am having the same problem while doing a Node upgrade to 16. As far as I can see the problem is that the plugin registers itself with the legacy
compiler.hooks.emit.tapAsync(plugin, emitPlugin);
and is run with the legacy plugins. The compression plugin uses the new
compiler.hooks.thisCompilation.tap(pluginName, compilation => {compilation.hooks.processAssets.tapPromise({ name: pluginName, stage: compiler.webpack.Compilation.PROCESS_ASSETS_STAGE_OPTIMIZE_TRANSFER, additionalAssets: true } ...
So the fix would probably be running the plugin in processAssets/PROCESS_ASSETS_STAGE_REPORT and adding a parameter to choose between new and legacy mode?
Can confirm this problem, latest everything.
Same here. The strange part is if the "delete original assets" option is set in the compression plugin, it works. It only lists either the original assets, or the zipped assets if the original assets are set to be deleted. But not both. So if you're ok with just having the zipped assets, this is a viable workaround.
This is probably the same issue (so I didn't want to start one,) but it also clashes with the brotli plugin (https://www.npmjs.com/package/brotli-webpack-plugin) and doesn't list anything that is generated by it.
Love this plugin though! Such great work!
Describe the bug On the previous version:
The output gzips from
compression-webpack-plugin
were added toassets.json
, ex:However, after updating to
The gzip portions no longer appear, at least on
assets-webpack-plugin
versions5.1.1
,7.0.0
, and7.1.0
(tested). The zips are still being generated, they just aren't being recorded in theassets.json
.Expected behavior That the zipped bundles and files will appear in
assets.json
Webpack Config The webpack configuration you are using when seeing the bug.
Desktop (please complete the following information):