diff options
-rw-r--r-- | src/bun.js/javascript.zig | 4 | ||||
-rw-r--r-- | test/bundler/bundler_compile.test.ts | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/bun.js/javascript.zig b/src/bun.js/javascript.zig index 752fcb3a4..e2e44e63a 100644 --- a/src/bun.js/javascript.zig +++ b/src/bun.js/javascript.zig @@ -1516,9 +1516,9 @@ pub const VirtualMachine = struct { ret.result = null; ret.path = specifier; return; - } else if (JSC.HardcodedModule.Map.get(specifier)) |result| { + } else if (JSC.HardcodedModule.Aliases.get(specifier, .bun)) |result| { ret.result = null; - ret.path = @as(string, @tagName(result)); + ret.path = result.path; return; } diff --git a/test/bundler/bundler_compile.test.ts b/test/bundler/bundler_compile.test.ts index 4c890feef..d7f60a0f8 100644 --- a/test/bundler/bundler_compile.test.ts +++ b/test/bundler/bundler_compile.test.ts @@ -18,6 +18,9 @@ describe("bundler", () => { files: { "/entry.ts": ` // testing random features of bun + import 'node:process'; + import 'process'; + import { Database } from "bun:sqlite"; import { serve } from 'bun'; import { getRandomSeed } from 'bun:jsc'; |