mirror of
https://github.com/sunniejs/vue-h5-template.git
synced 2025-04-06 03:57:50 +08:00
Fix config environment bug
This commit is contained in:
parent
19d5f86982
commit
c2109f0e78
@ -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
|
||||||
}
|
}
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
|
@ -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
|
||||||
|
@ -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',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user