clean-webpack-plugin
clean-webpack-plugin copied to clipboard
A webpack plugin to remove your build folder(s) before building
const { CleanWebpackPlugin } = require('clean-webpack-plugin') plugins: [ new CleanWebpackPlugin() ] throw err; Cannot read properties of undefined (reading 'emit') at CleanWebpackPlugin.apply
### Issue description or question We switched to web pack 5 and are using `[name].[contenthash].js` for the the output filename and the bundles are being cleaned up, but the `.map`...
### Does the order of CleanWebpackPlugin matter? In my project, I am running plugins in the below order, as you can see CleanWebpackPlugin is the last item in the array....
### Issue description or question Writing `!` before file and / or folder seems not to work. My file & folder is still getting removed after the build succeed. ###...
webpack has built-in support for clearing stale assets https://webpack.js.org/configuration/output/#outputclean, so I think we can deprecate this plugin
### Issue description or question After updating to webppack5 asks for output path: `[webpack-cli] TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined` ### Webpack Config ```js...
### Issue description or question With webpack 5.11.1 and clean-webpack-plugin 3.0.0 I get error `clean-webpack-plugin: options.output.path not defined. Plugin disabled...` when `path` isn't defined explicitly in the config file. But...
### Issue description or question You depend on del version 4.1.1, in the mean time there is del version 6.0.0 The old version has some issues deleting directories. When I...
### Issue description or question When using ``clean-webpack-plugin`` when webpacks ``output.path`` is the project root, everything is blindly deleted including the ``.git`` directory. IMO it should only remove old build...
### Issue description or question With dry run option on plugin doesn't remove `.htaccess` file in subfolder. When I turn dry off(`dry: false` or omitted) it removes `/public/admin/.htaccess` file. Since...