diff --git a/packages/babel-cli/bin/babel/index.js b/packages/babel-cli/bin/babel/index.js index 7b01cf9336..3235ad51ef 100755 --- a/packages/babel-cli/bin/babel/index.js +++ b/packages/babel-cli/bin/babel/index.js @@ -79,7 +79,9 @@ if (commander.extensions) { var errors = []; var filenames = commander.args.reduce(function (globbed, input) { - return globbed.concat(glob.sync(input)); + var files = glob.sync(input); + if (!files.length) files = [input]; + return globbed.concat(files); }, []); each(filenames, function (filename) {