npm i --save-dev terser-webpack-plugin
/config/index.js


import TerserPlugin from "terser-webpack-plugin"


const config = {
    mini: {
      webpackChain(chain, webpack) {
        chain.mode("production");
        chain.optimization.minimize(true);
        chain.plugin("terser").use(TerserPlugin, [
          {
            cache: true,
            extractComments: false,
            terserOptions: {
              output: {
                comments: false
              }
            }
          }
        ]);
      }
  }


}

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-06-30
  • 2021-04-26
  • 2021-07-06
  • 2022-12-23
  • 2022-12-23
  • 2021-12-05
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-03-10
相关资源
相似解决方案