delete require cache for config file so configs are actually reloaded

This commit is contained in:
Iuri Matias 2018-09-03 14:01:46 -04:00
parent 0314fb77c9
commit c3f7c58b8d
1 changed files with 1 additions and 0 deletions

View File

@ -148,6 +148,7 @@ Config.prototype._mergeConfig = function(configFilePath, defaultConfig, env, ena
let config; let config;
if (fs.existsSync(configFilePath + '.js')) { if (fs.existsSync(configFilePath + '.js')) {
delete require.cache[fs.dappPath(configFilePath + '.js')];
config = require(fs.dappPath(configFilePath + '.js')); config = require(fs.dappPath(configFilePath + '.js'));
} else { } else {
config = fs.readJSONSync(configFilePath + '.json'); config = fs.readJSONSync(configFilePath + '.json');