更新config

This commit is contained in:
406803045 2019-06-15 14:39:59 +08:00
parent 3114e842ac
commit ccf0ad30f6
3 changed files with 5 additions and 11 deletions

View File

@ -2,7 +2,7 @@ NODE_ENV='production'
# must start with VUE_APP_
VUE_APP_ENV = 'production'
#base url
BASE_URL = https://www.top1buyer.com/
BASE_URL = 'https://www.xxx.com/'
# base api
VUE_APP_BASE_API = '/prod-api'

View File

@ -2,8 +2,7 @@ NODE_ENV='production'
# must start with VUE_APP_
VUE_APP_ENV = 'staging'
#base url
#base url
BASE_URL = https://www.top1buyer.com/
BASE_URL = 'https://www.xxx.com/'
# base api
VUE_APP_BASE_API = '/stage-api'

View File

@ -12,17 +12,14 @@ const externals = {
'vue-router': 'VueRouter',
vuex: 'Vuex',
vant: 'vant',
axios: 'axios',
'crypto-js': 'CryptoJS'
axios: 'axios'
}
// cdn
const cdn = {
// 开发环境
dev: {
css: [],
js: [
'https://cdnjs.cloudflare.com/ajax/libs/babel-polyfill/7.4.4/polyfill.js'
]
js: ['https://cdnjs.cloudflare.com/ajax/libs/babel-polyfill/7.4.4/polyfill.js']
},
// 生产环境
build: {
@ -101,9 +98,7 @@ module.exports = {
config
// https://webpack.js.org/configuration/devtool/#development
.when(process.env.NODE_ENV === 'development', config =>
config.devtool('cheap-source-map')
)
.when(process.env.NODE_ENV === 'development', config => config.devtool('cheap-source-map'))
config.when(process.env.NODE_ENV !== 'development', config => {
config