mirror of
https://github.com/sunniejs/vue-h5-template.git
synced 2025-04-05 19:42:08 +08:00
Fix config environment bug
This commit is contained in:
parent
19d5f86982
commit
c2109f0e78
@ -17,6 +17,6 @@ if (IS_PROD) {
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
presets: [['@vue/cli-plugin-babel/preset', {useBuiltIns: 'usage', corejs: 3}]],
|
||||
presets: [['@vue/cli-plugin-babel/preset', { useBuiltIns: 'usage', corejs: 3 }]],
|
||||
plugins
|
||||
}
|
||||
|
@ -1,6 +1,5 @@
|
||||
// import qs from 'qs'
|
||||
// axios
|
||||
// import request from '@/utils/request'
|
||||
//home api
|
||||
// home api
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
//根据环境引入不同配置 process.env.NODE_ENV
|
||||
const environment = process.env.NODE_ENV || 'development'
|
||||
// 根据环境引入不同配置 process.env.VUE_APP_ENV
|
||||
const environment = process.env.VUE_APP_ENV || 'production'
|
||||
const config = require('./env.' + environment)
|
||||
module.exports = config
|
||||
|
@ -8,7 +8,6 @@ const resolve = dir => path.join(__dirname, dir)
|
||||
const name = defaultSettings.title || 'vue mobile template'
|
||||
// 生产环境,测试和正式
|
||||
const IS_PROD = ['production', 'prod'].includes(process.env.NODE_ENV)
|
||||
|
||||
// externals
|
||||
// const externals = {
|
||||
// vue: 'Vue',
|
||||
|
Loading…
x
Reference in New Issue
Block a user