rename Config*.js to envar-base-*.js

This commit is contained in:
陆柯 2022-04-23 16:06:21 +08:00
parent b8f677155c
commit 77fb687fc8

View File

@ -75,7 +75,7 @@ module.exports = {
return global.envar return global.envar
}, },
getDynamicConfig(dynamicConfigFile='config-dynamic.js') { // dynamicConfigFile should be absolute or relative to the node process's dir. getDynamicConfig(dynamicConfigFile='envar-base-dynamic.js') { // dynamicConfigFile should be absolute or relative to the node process's dir.
const fullpath = path.join(process.cwd(), dynamicConfigFile) const fullpath = path.join(process.cwd(), dynamicConfigFile)
if (fs.existsSync(fullpath)) { if (fs.existsSync(fullpath)) {
delete require.cache[require.resolve(fullpath)] // delete require.cache[fullpath] 不起作用 delete require.cache[require.resolve(fullpath)] // delete require.cache[fullpath] 不起作用