aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bundler/bundle_v2.zig6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/bundler/bundle_v2.zig b/src/bundler/bundle_v2.zig
index b70bac229..bb6ac6d8a 100644
--- a/src/bundler/bundle_v2.zig
+++ b/src/bundler/bundle_v2.zig
@@ -398,6 +398,12 @@ pub const BundleV2 = struct {
import_record.source_index = Index.invalid;
break;
}
+
+ // Handle redirects to a builtin or external module
+ // https://github.com/oven-sh/bun/issues/3764
+ if (!other_source.isValid()) {
+ break;
+ }
}
v.visit(import_record.source_index, check_dynamic_imports and import_record.kind == .dynamic, check_dynamic_imports);