Browse Source

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

fixed #14230
Zhi 6 năm trước cách đây
mục cha
commit
6d05ccc882
1 tập tin đã thay đổi với 12 bổ sung0 xóa
  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
   },