File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -278,6 +278,8 @@ Common.isConfigFile = function (filename) {
278
278
return 'yaml' ;
279
279
if ( filename . indexOf ( '.config.js' ) !== - 1 )
280
280
return 'js' ;
281
+ if ( filename . indexOf ( '.config.cjs' ) !== - 1 )
282
+ return 'js' ;
281
283
if ( filename . indexOf ( '.config.mjs' ) !== - 1 )
282
284
return 'mjs' ;
283
285
return null ;
@@ -310,7 +312,7 @@ Common.parseConfig = function(confObj, filename) {
310
312
filename . indexOf ( '.yaml' ) > - 1 ) {
311
313
return yamljs . parse ( confObj . toString ( ) ) ;
312
314
}
313
- else if ( filename . indexOf ( '.config.js' ) > - 1 || filename . indexOf ( '.config.mjs' ) > - 1 ) {
315
+ else if ( filename . indexOf ( '.config.js' ) > - 1 || filename . indexOf ( '.config.cjs' ) > - 1 || filename . indexOf ( '.config. mjs') > - 1 ) {
314
316
var confPath = require . resolve ( path . resolve ( filename ) ) ;
315
317
delete require . cache [ confPath ] ;
316
318
return require ( confPath ) ;
You can’t perform that action at this time.
0 commit comments