Open mman opened 4 months ago
Just tried to update to the latest version of CompressionPlugin
and the bug is still there:
compression-webpack-plugin: ^11.0.0 => 11.1.0
You can write a custom function for this option deleteOriginalAssets
, i.e. return false
for such files, but I agree we should not delete LICENSE
files here
I assume it would be best if the plugin works out of the box..., compress only what is needed and never delete stuff it should not ...
that's why I tested on fresh create-react-app with no modifications... to see whether any of our customisations are not at fault...
Bug report
We are using
CompressionPlugin
as the last step of our webpack config. When specifyingdeleteOriginalAssets: true
it does remove original.js
file when.js.gz
is produced, but it also accidentally deletes accompanying.js.LICENSE.txt
Actual Behavior
With
deleteOriginalAssets: false
:With
deleteOriginalAssets: true
:Expected Behavior
.js.LICENSE.txt
should remain in place.How Do We Reproduce?
This bug is affecting the following project where I summarised the issue as https://github.com/victronenergy/venus-html5-app/issues/370.
Main webpack config is located here: https://github.com/victronenergy/venus-html5-app/blob/master/config/webpack.config.js
Please paste the results of
npx webpack-cli info
here, and mention other relevant information