diff --git a/packages/babel-cli/src/babel/options.js b/packages/babel-cli/src/babel/options.js index b2d7aaf50f81..7d554ce6fbcc 100644 --- a/packages/babel-cli/src/babel/options.js +++ b/packages/babel-cli/src/babel/options.js @@ -222,6 +222,12 @@ export default function parseArgv(args: Array): CmdOptions { ); } + if (commander.keepFileExtension && commander.outFileExtension) { + errors.push( + "--out-file-extension cannot be used with --keep-file-extension", + ); + } + if (errors.length) { console.error("babel:"); errors.forEach(function(e) {