diff --git a/lib/common.ts b/lib/common.ts index 20e0424bb..4bef2c75c 100644 --- a/lib/common.ts +++ b/lib/common.ts @@ -89,7 +89,7 @@ export function isPackageJson(file: string) { } export function isDotJS(file: string) { - return path.extname(file) === '.js'; + return ['.js', '.cjs'].includes(path.extname(file)); } export function isDotJSON(file: string) {