File tree 1 file changed +8
-5
lines changed
1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -14,15 +14,15 @@ const BABEL_ROOT_CONFIG_FILENAMES = [
14
14
'babel.config.js' ,
15
15
'babel.config.cjs' ,
16
16
'babel.config.mjs' ,
17
- 'babel.config.json'
17
+ 'babel.config.json' ,
18
18
] ;
19
19
20
20
const BABEL_RELATIVE_CONFIG_FILENAMES = [
21
21
'.babelrc' ,
22
22
'.babelrc.js' ,
23
23
'.babelrc.cjs' ,
24
24
'.babelrc.mjs' ,
25
- '.babelrc.json'
25
+ '.babelrc.json' ,
26
26
] ;
27
27
28
28
const testFilePattern = '\\.(test|spec)\\.?' ;
@@ -37,9 +37,12 @@ function getBabelTarget(envConfig) {
37
37
}
38
38
39
39
function existsBabelConfig ( functionsDir ) {
40
- const babelConfigFile = findUp . sync ( [ ...BABEL_ROOT_CONFIG_FILENAMES , ...BABEL_RELATIVE_CONFIG_FILENAMES ] , {
41
- cwd : path . join ( process . cwd ( ) , functionsDir )
42
- } ) ;
40
+ const babelConfigFile = findUp . sync (
41
+ [ ...BABEL_ROOT_CONFIG_FILENAMES , ...BABEL_RELATIVE_CONFIG_FILENAMES ] ,
42
+ {
43
+ cwd : path . join ( process . cwd ( ) , functionsDir ) ,
44
+ } ,
45
+ ) ;
43
46
if ( babelConfigFile ) {
44
47
// Ensure babel config files outside of working dir are not accounted for
45
48
return babelConfigFile . includes ( process . cwd ( ) ) ;
You can’t perform that action at this time.
0 commit comments