Browse Source

webpack minimze & npm update

bach 1 year ago
parent
commit
877d10b4d2
3 changed files with 4195 additions and 3909 deletions
  1. 18 17
      build/webpack.config.prod.js
  2. 4176 3891
      package-lock.json
  3. 1 1
      src/pages/Home.vue

+ 18 - 17
build/webpack.config.prod.js

@@ -5,7 +5,7 @@ const merge = require('webpack-merge')
 const baseConfig = require('./webpack.config.base')
 const MiniCssExtractPlugin  = require('mini-css-extract-plugin')
 
-// const UglifyJSPlugin = require('uglifyjs-webpack-plugin')
+const UglifyJSPlugin = require('uglifyjs-webpack-plugin')
 // ERROR in vendor.js from UglifyJs
 // RangeError: Maximum call stack size exceeded
 
@@ -15,22 +15,23 @@ module.exports = merge(baseConfig, {
     publicPath: '/'
   },
   optimization: {
-    // minimizer: [
-    //   new UglifyJSPlugin({
-    //     uglifyOptions: {
-    //       // Eliminate comments
-    //       comments: false,
-    //       // remove warnings
-    //       warnings: false,
-    //       minimize: false,
-    //       mangle: false,
-    //       compress: {
-    //         // Drop console statements
-    //         drop_console: true,
-    //       }
-    //     }
-    //   })
-    // ],
+    minimize: true,
+    minimizer: [
+      new UglifyJSPlugin({
+        uglifyOptions: {
+          // Eliminate comments
+          comments: false,
+          // remove warnings
+          // warnings: false,
+          minimize: false,
+          mangle: false,
+          compress: {
+            // Drop console statements
+            drop_console: true,
+          }
+        }
+      })
+    ],
     splitChunks: {
       cacheGroups: {
         commons: {

File diff suppressed because it is too large
+ 4176 - 3891
package-lock.json


+ 1 - 1
src/pages/Home.vue

@@ -10,7 +10,7 @@
     <section class="row">
       <div class="col-2" />
       <div class="col-8 teasers">
-        <div  v-if="colophonHome.length && colophonHome.length > 0" class="wrapper">
+        <div v-if="colophonHome.length && colophonHome.length > 0" class="wrapper">
           <article
             v-for="page in colophonHome"
             :key="page.uuid"

Some files were not shown because too many files changed in this diff