Update index.js
This commit is contained in:
parent
2366eb4868
commit
83c7c47bbc
|
|
@ -8,8 +8,9 @@ const DEFAULT_CONFIG = {
|
||||||
API_URL: ""
|
API_URL: ""
|
||||||
}
|
}
|
||||||
|
|
||||||
//如果有外部APP_CONFIG就合并
|
// 如果生产模式,就合并动态的APP_CONFIG
|
||||||
if(APP_CONFIG){
|
// public/config.js
|
||||||
|
if(process.env.NODE_ENV === 'production'){
|
||||||
Object.assign(DEFAULT_CONFIG, APP_CONFIG)
|
Object.assign(DEFAULT_CONFIG, APP_CONFIG)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue