File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
packages/app/src/sandbox/eval/transpilers/babel Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -29,18 +29,14 @@ const DEFAULT_BABEL_CONFIG = {
2929/**
3030 * Parses the .babelrc if it exists, if it doesn't it will return a default config
3131 */
32- export default function getBabelConfig ( config : Object = { } , path : string ) {
33- let resolvedConfig = DEFAULT_BABEL_CONFIG ;
32+ export default function getBabelConfig ( config ? : Object , path : string ) {
33+ const resolvedConfig = config || DEFAULT_BABEL_CONFIG ;
3434
35- resolvedConfig = {
35+ return {
3636 ...resolvedConfig ,
37- plugins : config . plugins != null ? config . plugins : resolvedConfig . plugins ,
38- presets : config . presets != null ? config . presets : resolvedConfig . presets ,
3937 sourceMaps : 'inline' ,
4038 sourceFileName : path ,
4139 sourceMapTarget : `${ path } :transpiled` ,
4240 filename : path ,
4341 } ;
44-
45- return resolvedConfig ;
4642}
You can’t perform that action at this time.
0 commit comments