Explorar el Código

Сконфигурировал TerserPlugin

Book Pauk hace 6 años
padre
commit
dca12b6467
Se han modificado 1 ficheros con 9 adiciones y 1 borrados
  1. 9 1
      build/webpack.prod.config.js

+ 9 - 1
build/webpack.prod.config.js

@@ -32,7 +32,15 @@ module.exports = merge(baseWpConfig, {
     },
     optimization: {
         minimizer: [
-            new TerserPlugin(),
+            new TerserPlugin({
+                cache: true,
+                parallel: true,
+                terserOptions: {
+                    output: {
+                        comments: false,
+                    },
+                },
+            }),
             new OptimizeCSSAssetsPlugin()
         ]
     },