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 @@ -251,6 +251,8 @@ Common.isConfigFile = function (filename) {
251
251
return 'yaml' ;
252
252
if ( filename . indexOf ( '.config.js' ) !== - 1 )
253
253
return 'js' ;
254
+ if ( filename . indexOf ( '.config.cjs' ) !== - 1 )
255
+ return 'js' ;
254
256
if ( filename . indexOf ( '.config.mjs' ) !== - 1 )
255
257
return 'mjs' ;
256
258
return null ;
@@ -283,7 +285,7 @@ Common.parseConfig = function(confObj, filename) {
283
285
filename . indexOf ( '.yaml' ) > - 1 ) {
284
286
return yamljs . parse ( confObj . toString ( ) ) ;
285
287
}
286
- else if ( filename . indexOf ( '.config.js' ) > - 1 || filename . indexOf ( '.config.mjs' ) > - 1 ) {
288
+ else if ( filename . indexOf ( '.config.js' ) > - 1 || filename . indexOf ( '.config.cjs' ) > - 1 || filename . indexOf ( '.config. mjs') > - 1 ) {
287
289
var confPath = require . resolve ( path . resolve ( filename ) ) ;
288
290
delete require . cache [ confPath ] ;
289
291
return require ( confPath ) ;
You can’t perform that action at this time.
0 commit comments