Selaa lähdekoodia

perf 设置config

wangcz 7 vuotta sitten
vanhempi
commit
4a835afb06
2 muutettua tiedostoa jossa 22 lisäystä ja 23 poistoa
  1. 21 22
      nuxt.config.js
  2. 1 1
      package.json

+ 21 - 22
nuxt.config.js

@@ -1,4 +1,4 @@
-var HtmlWebpackPlugin = require('html-webpack-plugin');
+// var HtmlWebpackPlugin = require('html-webpack-plugin');
 const path = require('path')
 const isProdMode = Object.is(process.env.NODE_ENV, 'production')
 const baseUrl = process.env.BASE_URL || (isProdMode ? 'https://sso.ubtob.com/' : 'https://test-sso-server.uuzcc.cn/')
@@ -69,27 +69,26 @@ module.exports = {
         '~plugins': path.join(__dirname, 'plugins'),
         '~store': path.join(__dirname, 'store')
       })
-      if (config.plugins[4] && config.plugins[4].options && config.plugins[4].options.minify) {
-        config.plugins[4].options.minify = {
-          removeAttributeQuotes: true,
-          collapseWhitespace: true,
-          html5: true,
-          minifyCSS: true,
-          removeComments: true,
-          removeEmptyAttributes: true,
-        }
-      }
-      if (config.plugins[5] && config.plugins[5].options && config.plugins[5].options.minify) {
-        config.plugins[5].options.minify = {
-          removeAttributeQuotes: true,
-          collapseWhitespace: true,
-          html5: true,
-          minifyCSS: true,
-          removeComments: true,
-          removeEmptyAttributes: true,
-        }
-
-      }
+      // if (config.plugins[4] && config.plugins[4].options && config.plugins[4].options.minify) {
+      //   config.plugins[4].options.minify = {
+      //     removeAttributeQuotes: true,
+      //     collapseWhitespace: true,
+      //     html5: true,
+      //     minifyCSS: true,
+      //     removeComments: true,
+      //     removeEmptyAttributes: true,
+      //   }
+      // }
+      // if (config.plugins[5] && config.plugins[5].options && config.plugins[5].options.minify) {
+      //   config.plugins[5].options.minify = {
+      //     removeAttributeQuotes: true,
+      //     collapseWhitespace: true,
+      //     html5: true,
+      //     minifyCSS: true,
+      //     removeComments: true,
+      //     removeEmptyAttributes: true,
+      //   }
+      // }
       // config.plugins.push(new HtmlWebpackPlugin({
       //   title: 'React Title !',
       //   template: './app.html',

+ 1 - 1
package.json

@@ -7,7 +7,6 @@
   "dependencies": {
     "@babel/polyfill": "^7.2.3",
     "axios": "^0.15.3",
-    "babel-polyfill": "^6.26.0",
     "bezier-easing": "^2.0.3",
     "bootstrap": "^3.3.7",
     "cookiejar": "^2.1.1",
@@ -50,6 +49,7 @@
     "eslint-plugin-promise": "^3.4.1",
     "eslint-plugin-standard": "^2.0.1",
     "html-webpack-plugin": "^3.2.0",
+    "mini-css-extract-plugin": "^0.5.0",
     "node-sass": "^4.11.0",
     "nodemon": "^1.14.11",
     "sass-loader": "^7.1.0"