Open Den-dp opened 3 years ago
I can confirm this.
A hotfix for this is:
const AssetsPlugin = require('assets-webpack-plugin');
const path = require('path');
module.exports = {
output: {
path: path.resolve(__dirname, 'dist'),
clean: {
keep: /webpack-assets\.json/
}
},
plugins: [
new AssetsPlugin({
useCompilerPath: true,
})
]
};
Describe the bug
webpack-assets.json
gets removed if the new output.clean webpack@5 option is used.To Reproduce Steps to reproduce the behavior:
Expected behavior
webpack-assets.json
file should be present in the output folder even if webpack configured withclean: true
.Webpack Config
Desktop (please complete the following information):
Additional context I found that this is a regression that was introduced in 7.1.0 after fixing #327 via #392 Works fine if downgraded to the 7.0.0