From 54d6b4a65174aecc386b97b81f2a8abe5b01f3ab Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Tue, 2 Jul 2024 11:46:59 +0200 Subject: [PATCH] fix: use native esm import for built-ins --- src/require.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/require.ts b/src/require.ts index 8f8da942..e0781664 100644 --- a/src/require.ts +++ b/src/require.ts @@ -24,7 +24,7 @@ export function jitiRequire( // Check for builtin node module like fs if (builtinModules.includes(id) || id === ".pnp.js" /* #24 */) { - return ctx.nativeRequire(id); + return nativeImportOrRequire(ctx, id, opts.async); } // Experimental Bun support