From 5c424f95898c28bea639e004d463cf31689a1155 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E8=89=AF?= <841369634@qq.com> Date: Sun, 21 Apr 2024 22:33:25 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"=E8=BF=9C=E7=A8=8B=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E6=8E=92=E5=BA=8F=E5=9C=A8=E9=BB=98=E8=AE=A4=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E4=B9=8B=E5=89=8D=E3=80=82"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit ae20539e87ca251135ecf61ac0401a8e46d3c730. --- packages/core/src/config.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/packages/core/src/config.js b/packages/core/src/config.js index fa33b1e..cb8dd6a 100644 --- a/packages/core/src/config.js +++ b/packages/core/src/config.js @@ -206,17 +206,11 @@ const configApi = { return configApi.load(newConfig) }, load (newConfig) { - const remoteConfig = configApi.readRemoteConfig() - // 以用户配置作为基准配置,是为了保证用户配置的顺序在前 const merged = newConfig != null ? lodash.cloneDeep(newConfig) : {} - // 先合并一次远程配置是为了让远程配置排序在默认配置之前,用户配置之后 - if (remoteConfig != null) { - mergeApi.doMerge(merged, remoteConfig) - } mergeApi.doMerge(merged, defConfig) // 合并默认配置 - mergeApi.doMerge(merged, remoteConfig) // 合并远程配置 + mergeApi.doMerge(merged, configApi.readRemoteConfig()) // 合并远程配置 if (newConfig != null) { mergeApi.doMerge(merged, newConfig) // 再合并一次用户配置,使用户配置重新生效 }