Skip to content

Commit 39f8285

Browse files
committed
Merge pull request react-bootstrap#714 from react-bootstrap/handle-race-condition
Handle race condition with creation of babel-cache directory
2 parents 4ffa55b + fc0c1c3 commit 39f8285

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

webpack/base.config.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,13 @@ import yargs from 'yargs';
66
const babelCache = path.resolve(path.join(__dirname, '../.babel-cache'));
77

88
if (!fs.existsSync(babelCache)) {
9-
fs.mkdirSync(babelCache);
9+
try {
10+
fs.mkdirSync(babelCache);
11+
} catch (err) {
12+
if (err.code !== 'EEXIST') {
13+
console.error(err.stack);
14+
}
15+
}
1016
}
1117

1218
export const options = yargs

0 commit comments

Comments
 (0)