Skip to content

Commit

Permalink
Fix empty config file caused by duplicate require(). (#5)
Browse files Browse the repository at this point in the history
Co-authored-by: Kyle Marple <[email protected]>
  • Loading branch information
kmarple1 and Kyle Marple authored Jul 17, 2020
1 parent 33581e6 commit fc3f159
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions postcss.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ function loadConfig(configPath) {
function loadRawConf(configPath) {
const jsConfPath = /\.js$/.test(configPath) ? configPath : path.resolve(PWD, 'postcss.config.js');
if (fs.existsSync(jsConfPath)) {
delete require.cache[require.resolve(jsConfPath)];
const conf = require(jsConfPath);
return { conf, confPath: jsConfPath };
}
Expand Down

0 comments on commit fc3f159

Please sign in to comment.