Skip to content

Commit

Permalink
fix: use native esm import for built-ins
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Jul 2, 2024
1 parent ee4489d commit 54d6b4a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/require.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 54d6b4a

Please sign in to comment.