Answer the question
In order to leave comments, you need to log in
How to use css-minimizer-webpack-plugin + Vue3 Cli?
Hello, trying to optimize the generated css, I decided to use сss-minimizer-webpack-plugin
(why, unlike html-webpack-plugin/terser-webpack-plugin, it didn’t come with vue / cli and I had to yarn add css-minimizer-webpack-plugin --save-dev
)
Actually, after such a setup, according to the documentation
new CssMinimizerWebpackPlugin({
minify: [
CssMinimizerWebpackPlugin.cssnanoMinify,
CssMinimizerWebpackPlugin.cleanCssMinify,
],
minimizerOptions: [
{
preset: ["advanced", { discardComments: { removeAll: true } }],
},
{
level: {
1: {
roundingPrecision: "all=2,px=4",
},
},
},
],
}),
yarn lint passes all checks, but yarn serve0% compiling ERROR TypeError: Cannot read properties of undefined (reading 'tapPromise')
TypeError: Cannot read properties of undefined (reading 'tapPromise')
at D:\Projects\FrontEnd\node_modules\css-minimizer-webpack-plugin\dist\index.js:375:3
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question