Prechádzať zdrojové kódy

Merge pull request #14233 from island205/bugfix/remove-comments-in-umd-module

Build: delete unremoved comments in umd module `lib/index.js`
Zhi Cun 6 rokov pred
rodič
commit
d351c075c2
1 zmenil súbory, kde vykonal 12 pridanie a 0 odobranie
  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
   },