Browse Source

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

Book Pauk 6 năm trước cách đây
mục cha
commit
dca12b6467
1 tập tin đã thay đổi với 9 bổ sung1 xóa
  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()
         ]
     },