Skip to content

Commit fa07e37

Browse files
committed
feat(hooks): allow cjs extensions
1 parent 4b9e451 commit fa07e37

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/common/services/hooks-service.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,11 @@ export class HooksService implements IHooksService {
188188
let inProc = false;
189189
if (!command) {
190190
command = hook.fullPath;
191-
if ([".mjs", ".js"].includes(path.extname(hook.fullPath).toLowerCase())) {
191+
if (
192+
[".mjs", ".cjs", ".js"].includes(
193+
path.extname(hook.fullPath).toLowerCase(),
194+
)
195+
) {
192196
command = process.argv[0];
193197
inProc = isESM
194198
? true

0 commit comments

Comments
 (0)