Skip to content

Commit

Permalink
Handle race condition with creation of babel-cache directory
Browse files Browse the repository at this point in the history
  • Loading branch information
mtscout6 committed May 21, 2015
1 parent 7ae8a7b commit fc0c1c3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion webpack/base.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@ import yargs from 'yargs';
const babelCache = path.resolve(path.join(__dirname, '../.babel-cache'));

if (!fs.existsSync(babelCache)) {
fs.mkdirSync(babelCache);
try {
fs.mkdirSync(babelCache);
} catch (err) {
if (err.code !== 'EEXIST') {
console.error(err.stack);
}
}
}

export const options = yargs
Expand Down

0 comments on commit fc0c1c3

Please sign in to comment.