Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1c5c7d5

Browse files
authored
fix(node): should call hooks with await (#950)
1 parent a3caeaa commit 1c5c7d5

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

packages/rolldown/src/plugin/bindingify-build-hooks.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export function bindingifyBuildStart(
1717
const [handler, _optionsIgnoredSofar] = normalizeHook(hook)
1818

1919
return async (ctx) => {
20-
handler.call(ctx, options)
20+
await handler.call(ctx, options)
2121
}
2222
}
2323

@@ -30,7 +30,7 @@ export function bindingifyBuildEnd(
3030
const [handler, _optionsIgnoredSofar] = normalizeHook(hook)
3131

3232
return async (err) => {
33-
handler.call(null, err ? new Error(err) : undefined)
33+
await handler.call(null, err ? new Error(err) : undefined)
3434
}
3535
}
3636

@@ -144,6 +144,6 @@ export function bindingifyModuleParsed(
144144
const [handler, _optionsIgnoredSofar] = normalizeHook(hook)
145145

146146
return async (ctx, moduleInfo) => {
147-
handler.call(ctx, transformModuleInfo(moduleInfo))
147+
await handler.call(ctx, transformModuleInfo(moduleInfo))
148148
}
149149
}

0 commit comments

Comments
 (0)