Skip to content

Commit

Permalink
Update makeConfig.js (#579)
Browse files Browse the repository at this point in the history
Remove backstop config from cache to provide ability change it from server side(expressjs as example)
  • Loading branch information
anton-kulagin authored and garris committed Nov 11, 2017
1 parent e5ae4a8 commit ea9edc0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/util/makeConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ function loadProjectConfig (command, options, config) {
userConfig = options.config;
} else if (config.backstopConfigFileName) {
try {
//Remove from cache config content
+ delete require.cache[require.resolve(config.backstopConfigFileName)]
console.log('Loading config: ', config.backstopConfigFileName, '\n');
userConfig = require(config.backstopConfigFileName);
} catch (e) {
Expand Down

0 comments on commit ea9edc0

Please sign in to comment.