Skip to content

Commit dce9880

Browse files
committed
⚡ enhance parseConfig
1 parent d854112 commit dce9880

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

libs/Service/base/BaseService.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,9 +250,13 @@ class BaseService {
250250
if (!_.isEmpty(microConfig)) {
251251
const root = microConfig.root;
252252
const filename = CONSTANTS.EXTRAL_CONFIG_NAME.replace('extra', name);
253-
const config = loadFile(root, filename);
254-
if (!_.isEmpty(config)) {
255-
return config;
253+
const _config = loadFile(root, filename);
254+
if (!_.isEmpty(_config)) {
255+
return _config;
256+
}
257+
const _extraConfig = this.extraConfig || {};
258+
if (!_.isEmpty(_extraConfig[name])) {
259+
return _extraConfig[name];
256260
}
257261
const _originalConfig = microConfig.originalConfig || {};
258262
if (!_.isEmpty(_originalConfig[name])) {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@micro-app/core",
3-
"version": "0.2.1",
3+
"version": "0.2.2",
44
"description": "[Core] Pluggable micro application framework.",
55
"main": "src/index.js",
66
"scripts": {

0 commit comments

Comments
 (0)