Explorar o código

fix: change baseurl

furffico hai 1 ano
pai
achega
86fa4f795e
Modificáronse 3 ficheiros con 4 adicións e 10 borrados
  1. 1 1
      .env.development
  2. 1 1
      .env.production
  3. 2 8
      vue.config.js

+ 1 - 1
.env.development

@@ -2,7 +2,7 @@
 ENV = 'development'
 
 // api接口请求地址
-VUE_APP_BASE_API = 'http://127.0.0.1:8085'
+VUE_APP_BASE_API = ''
 
 # 静态资源文件url
 VUE_APP_RESOURCES_URL = 'https://img.mall4j.com/'

+ 1 - 1
.env.production

@@ -2,7 +2,7 @@
 ENV = 'production'
 
 // api接口请求地址
-VUE_APP_BASE_API = 'http://127.0.0.1:8085'
+VUE_APP_BASE_API = ''
 
 # 静态资源文件url
 VUE_APP_RESOURCES_URL = 'https://img.mall4j.com/'

+ 2 - 8
vue.config.js

@@ -1,5 +1,6 @@
 'use strict'
 const path = require('path')
+const fs = require('fs')
 
 function resolve(dir) {
   return path.join(__dirname, dir)
@@ -107,7 +108,6 @@ module.exports = {
               cacheGroups: {
                 libs: {
                   name: 'libs',
-                  // test: /[\\/]node_modules[\\/]/,
                   priority: 50,
                   chunks: 'initial',
                 },
@@ -115,32 +115,26 @@ module.exports = {
                   name: 'elementUI', // split elementUI into a single package
                   priority: 40,
                   test: /[\\/]node_modules[\\/]_?element-ui(.*)/,
-                  chunks: 'async',
                 },
                 avue: {
                   name: 'avue', // split avue into a single package
                   priority: 41,
                   test: /[\\/]node_modules[\\/]@smallwei(.*)/,
-                  chunks: 'async',
                   reuseExistingChunk: true
                 },
                 utils: {
                   name: 'utils',
                   test: /([\\/]src[\\/]utils)|lodash|axios|crypto-js/,
                   priority: 30,
-                  chunks: 'async',
                 },
                 styles: {
                   name: 'styles',  // pack all remaining style files
                   test: /\.(css|scss)$/,
                   priority: 45,
-                  chunks: 'all',
                   reuseExistingChunk: true
-                }
+                },
               }
             })
-          // https:// webpack.js.org/configuration/optimization/#optimizationruntimechunk
-          config.optimization.runtimeChunk(false)
         }
       )
   }