Fix config environment bug

This commit is contained in:
sunniejs 2020-12-24 09:24:21 +08:00
parent 19d5f86982
commit c2109f0e78
4 changed files with 4 additions and 6 deletions

View File

@ -17,6 +17,6 @@ if (IS_PROD) {
} }
module.exports = { module.exports = {
presets: [['@vue/cli-plugin-babel/preset', {useBuiltIns: 'usage', corejs: 3}]], presets: [['@vue/cli-plugin-babel/preset', { useBuiltIns: 'usage', corejs: 3 }]],
plugins plugins
} }

View File

@ -1,6 +1,5 @@
// import qs from 'qs' // import qs from 'qs'
// axios // axios
// import request from '@/utils/request' // import request from '@/utils/request'
//home api // home api

View File

@ -1,4 +1,4 @@
//根据环境引入不同配置 process.env.NODE_ENV // 根据环境引入不同配置 process.env.VUE_APP_ENV
const environment = process.env.NODE_ENV || 'development' const environment = process.env.VUE_APP_ENV || 'production'
const config = require('./env.' + environment) const config = require('./env.' + environment)
module.exports = config module.exports = config

View File

@ -8,7 +8,6 @@ const resolve = dir => path.join(__dirname, dir)
const name = defaultSettings.title || 'vue mobile template' const name = defaultSettings.title || 'vue mobile template'
// 生产环境,测试和正式 // 生产环境,测试和正式
const IS_PROD = ['production', 'prod'].includes(process.env.NODE_ENV) const IS_PROD = ['production', 'prod'].includes(process.env.NODE_ENV)
// externals // externals
// const externals = { // const externals = {
// vue: 'Vue', // vue: 'Vue',