Update index.js

This commit is contained in:
sc 2021-05-07 09:11:39 +08:00
parent 2366eb4868
commit 83c7c47bbc
1 changed files with 3 additions and 2 deletions

View File

@ -8,8 +8,9 @@ const DEFAULT_CONFIG = {
API_URL: ""
}
//如果有外部APP_CONFIG就合并
if(APP_CONFIG){
// 如果生产模式就合并动态的APP_CONFIG
// public/config.js
if(process.env.NODE_ENV === 'production'){
Object.assign(DEFAULT_CONFIG, APP_CONFIG)
}