File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
packages/babel-cli/src/babel Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 33import fs from "fs" ;
44
55import commander from "commander" ;
6- import { version } from "@babel/core" ;
6+ import { loadOptions , version } from "@babel/core" ;
77import glob from "glob" ;
88
99import pkg from "../../package.json" ;
@@ -301,7 +301,7 @@ export default function parseArgv(args: Array<string>): CmdOptions | null {
301301 }
302302 }
303303
304- return {
304+ var opts = {
305305 babelOptions,
306306 cliOptions : {
307307 filename : opts . filename ,
@@ -323,6 +323,12 @@ export default function parseArgv(args: Array<string>): CmdOptions | null {
323323 sourceMapTarget : opts . sourceMapTarget ,
324324 } ,
325325 } ;
326+
327+ if ( babelOptions . sourceMaps === undefined ) {
328+ babelOptions . sourceMaps = loadOptions ( { filename : "" } ) . sourceMaps ;
329+ }
330+
331+ return opts ;
326332}
327333
328334function booleanify ( val : any ) : boolean | any {
You can’t perform that action at this time.
0 commit comments