Minimize compression css using css-loader doesn't work?

 {
        test: /\.(scss|css)$/,
        use: [
          !env.production
            ? "style-loader"
            : MiniCssExtractPlugin.loader,
          {
            loader: "css-loader",
            options: { 
              modules: true,
              minimize: true    //css
            }
          },
          {
            loader: "px2rem-loader",
            // options here
            options: {
              remUni: 75,
              remPrecision: 8
            }
          },
          "sass-loader"
        ]
      }

style.css after build is still not compressed?

Apr.08,2021
What is the version of

css-loader ? 1.0.0 later minimize option is breaking change , see


change plug-in webpack.optimize.UglifyJsPlugin

Menu