@@ -6,8 +6,6 @@ const extend = require('extend2');
66const assert = require ( 'assert' ) ;
77const { Console } = require ( 'console' ) ;
88
9- const SET_CONFIG_META = Symbol ( 'Loader#setConfigMeta' ) ;
10-
119module . exports = {
1210
1311 /**
@@ -94,7 +92,7 @@ module.exports = {
9492 }
9593
9694 // store config meta, check where is the property of config come from.
97- this [ SET_CONFIG_META ] ( config , filepath ) ;
95+ this . _setConfigMeta ( config , filepath ) ;
9896
9997 return config ;
10098 } ,
@@ -104,14 +102,14 @@ module.exports = {
104102 if ( ! envConfigStr ) return ;
105103 try {
106104 const envConfig = JSON . parse ( envConfigStr ) ;
107- this [ SET_CONFIG_META ] ( envConfig , '<process.env.EGG_APP_CONFIG>' ) ;
105+ this . _setConfigMeta ( envConfig , '<process.env.EGG_APP_CONFIG>' ) ;
108106 return envConfig ;
109107 } catch ( err ) {
110108 this . options . logger . warn ( '[egg-loader] process.env.EGG_APP_CONFIG is not invalid JSON: %s' , envConfigStr ) ;
111109 }
112110 } ,
113111
114- [ SET_CONFIG_META ] ( config , filepath ) {
112+ _setConfigMeta ( config , filepath ) {
115113 config = extend ( true , { } , config ) ;
116114 setConfig ( config , filepath ) ;
117115 extend ( true , this . configMeta , config ) ;
0 commit comments