Browse Source

:zap: 优化代码

smallchill 7 years ago
parent
commit
54eb7988f4
1 changed files with 32 additions and 32 deletions
  1. 32 32
      vue.config.js

+ 32 - 32
vue.config.js

@@ -2,38 +2,38 @@
 let baseUrl = './'
 let url = 'http://localhost:8800'
 module.exports = {
-    publicPath: baseUrl, // 根据你的实际情况更改这里
-    lintOnSave: true,
-    productionSourceMap: false,
-    chainWebpack: (config) => {
-        //忽略的打包文件
-        config.externals({
-            'vue': 'Vue',
-            'vue-router': 'VueRouter',
-            'vuex': 'Vuex',
-            'axios': 'axios',
-            'element-ui': 'ELEMENT',
-        })
-        const entry = config.entry('app')
-        entry
-            .add('babel-polyfill')
-            .end()
-        entry
-            .add('classlist-polyfill')
-            .end()
-        entry
-            .add('@/mock')
-            .end()
-    },
-    devServer: {
-        proxy: {
-            '/api': {
-                target: url,
-                ws: true,
-                pathRewrite: {
-                    '^/api': '/'
-                }
-            }
+  publicPath: baseUrl, // 根据你的实际情况更改这里
+  lintOnSave: true,
+  productionSourceMap: false,
+  chainWebpack: (config) => {
+    //忽略的打包文件
+    config.externals({
+      'vue': 'Vue',
+      'vue-router': 'VueRouter',
+      'vuex': 'Vuex',
+      'axios': 'axios',
+      'element-ui': 'ELEMENT',
+    })
+    const entry = config.entry('app')
+    entry
+      .add('babel-polyfill')
+      .end()
+    entry
+      .add('classlist-polyfill')
+      .end()
+    entry
+      .add('@/mock')
+      .end()
+  },
+  devServer: {
+    proxy: {
+      '/api': {
+        target: url,
+        ws: true,
+        pathRewrite: {
+          '^/api': '/'
         }
+      }
     }
+  }
 }