提交 c1dd4b4d 编写于 作者: Y yylgit

fix domain config

上级 76817561
...@@ -161,7 +161,13 @@ module.exports = function (options) { ...@@ -161,7 +161,13 @@ module.exports = function (options) {
// 兼容旧版api // 兼容旧版api
let apiPrefix = options.apiPrefix || devApiPrefix; let apiPrefix = options.apiPrefix || devApiPrefix;
// 新版api 优先读取domainMap // 新版api 优先读取domainMap
let domain = options.domain || {}; // 浅拷贝不影响config中的domain
let domain = {};
if (options.domain) {
domain = {
...options.domain
}
}
if (options.media === 'dev') { if (options.media === 'dev') {
......
...@@ -161,7 +161,7 @@ _.get = function() { ...@@ -161,7 +161,7 @@ _.get = function() {
if (baseConfig) { if (baseConfig) {
platforms.forEach(platform => { platforms.forEach(platform => {
if (chameleonConfig[platform]) { if (chameleonConfig[platform]) {
utils.merge(chameleonConfig[platform], baseConfig); utils.merge(chameleonConfig[platform], JSON.parse(JSON.stringify(baseConfig)));
} }
}) })
delete chameleonConfig.base; delete chameleonConfig.base;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册