瀏覽代碼

Webpack with scope hoisting

dev1
Lyubo Marinov 8 年之前
父節點
當前提交
83d97ed493
共有 1 個檔案被更改,包括 1 行新增10 行删除
  1. 1
    10
      webpack.config.js

+ 1
- 10
webpack.config.js 查看文件

@@ -15,21 +15,12 @@ const plugins = [
15 15
 ];
16 16
 
17 17
 if (minimize) {
18
-    // While webpack will automatically insert UglifyJsPlugin when minimize is
19
-    // true, the defaults of UglifyJsPlugin in webpack 1 and webpack 2 are
20
-    // different. Explicitly state what we want even if we want defaults in
21
-    // order to prepare for webpack 2.
18
+    plugins.push(new webpack.optimize.ModuleConcatenationPlugin());
22 19
     plugins.push(new webpack.optimize.UglifyJsPlugin({
23 20
         compress: {
24
-            // It is nice to see warnings from UglifyJsPlugin that something is
25
-            // unused and, consequently, is removed. The default is false in
26
-            // webpack 2.
27 21
             warnings: true
28 22
         },
29 23
         extractComments: true,
30
-
31
-        // Use the source map to map error message locations to modules. The
32
-        // default is false in webpack 2.
33 24
         sourceMap: true
34 25
     }));
35 26
 }

Loading…
取消
儲存