Reputation: 11
webpack.common.js
optimization: {
minimize: true,
minimizer: [
new CssMinimizerPlugin({
test: /\.foo\.css$/i,
//or already used
test: /\.css(\?.*)?$/i
}),
],
},
any suggestion what the problem is?
Upvotes: 0
Views: 3590
Reputation: 165
This error is probably referring to
compilation.hooks.processAssets.tapPromise
You can use processAssets hook with Webpack versions higher than 5.
css-minimizer-webpack-plugin
migrated on processAssets hook since version 1.1.0
.
Basically, there are two options to resolve this issue:
to lower version of css-minimizer-webpack-plugin
to 1.0.0
npm uninstall css-minimizer-webpack-plugin
npm install [email protected]
or
Upvotes: 2