[Bug fix] Reaching maximum calls stack when copying large number of non-js files in babel-cli (#7320)

Maximum call stack occurs when you try to copy large number of non-js files using `babel-cli@7.0.0-beta.38` or `babel-cli@7.0.0-beta.39`
This commit is contained in:
Tauyekel Kunzhol
2018-02-03 10:56:57 +06:00
committed by Logan Smyth
parent 278cd5e572
commit 2254ed45d2

View File

@@ -13,7 +13,7 @@ export default function(commander, filenames, opts) {
base = undefined;
}
if (!util.isCompilableExtension(relative, commander.extensions)) {
return callback();
return process.nextTick(callback);
}
// remove extension and then append back on .js