From 3a9a6c63ac58564d8bae126a3edfc368ca4be671 Mon Sep 17 00:00:00 2001 From: Ai Hoshino Date: Sun, 20 Aug 2023 16:52:17 +0800 Subject: Fix(bundler): use different alias mappings based on the target. (#4163) * Fix(bundler): use different alias mappings based on the target. Close: #3844 * chore: reduce duplicated code. * chore: split to two separate ComptimeStringMap. --- src/bun.js/javascript.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/bun.js/javascript.zig') diff --git a/src/bun.js/javascript.zig b/src/bun.js/javascript.zig index a74da82c8..98e61f3b0 100644 --- a/src/bun.js/javascript.zig +++ b/src/bun.js/javascript.zig @@ -1592,7 +1592,7 @@ pub const VirtualMachine = struct { } } - if (JSC.HardcodedModule.Aliases.getWithEql(specifier, bun.String.eqlComptime)) |hardcoded| { + if (JSC.HardcodedModule.Aliases.getWithEql(specifier, bun.String.eqlComptime, jsc_vm.bundler.options.target)) |hardcoded| { if (hardcoded.tag == .none) { resolveMaybeNeedsTrailingSlash( res, -- cgit v1.2.3