1 parent 60a23e3 commit 9a36d0eCopy full SHA for 9a36d0e
1 file changed
src/require.ts
@@ -28,7 +28,7 @@ export function jitiRequire(ctx: Context, id: string, async: boolean) {
28
try {
29
debug(ctx, `[bun] [native] ${id}`);
30
id = jitiResolve(ctx, id);
31
- if (async) {
+ if (async && ctx.nativeImport) {
32
return ctx.nativeImport(id).then((m: any) => {
33
if (ctx.opts.requireCache === false) {
34
delete ctx.nativeRequire.cache[id];
0 commit comments