瀏覽代碼

Build: delete unremoved comments in umd module `lib/index.js`

fixed #14230
Zhi 6 年之前
父節點
當前提交
6d05ccc882
共有 1 個文件被更改,包括 12 次插入0 次删除
  1. 12 0
      build/webpack.conf.js

+ 12 - 0
build/webpack.conf.js

@@ -1,6 +1,7 @@
 const path = require('path');
 const ProgressBarPlugin = require('progress-bar-webpack-plugin');
 const VueLoaderPlugin = require('vue-loader/lib/plugin');
+const TerserPlugin = require('terser-webpack-plugin');
 
 const config = require('./config');
 
@@ -26,6 +27,17 @@ module.exports = {
   externals: {
     vue: config.vue
   },
+  optimization: {
+    minimizer: [
+      new TerserPlugin({
+        terserOptions: {
+          output: {
+            comments: false
+          }
+        },
+      })
+    ]
+  },
   performance: {
     hints: false
   },