Skip to content

Commit a369f81

Browse files
committed
feat(hooks): support esm
1 parent 4d184be commit a369f81

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/common/services/hooks-service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ export class HooksService implements IHooksService {
179179
let inProc = false;
180180
if (!command) {
181181
command = hook.fullPath;
182-
if (path.extname(hook.fullPath).toLowerCase() === ".js") {
182+
if ([".mjs", ".js"].includes(path.extname(hook.fullPath).toLowerCase())) {
183183
command = process.argv[0];
184184
inProc = this.shouldExecuteInProcess(this.$fs.readText(hook.fullPath));
185185
}

0 commit comments

Comments
 (0)