aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bundler/bundle_v2.zig7
-rw-r--r--src/js_printer.zig5
2 files changed, 11 insertions, 1 deletions
diff --git a/src/bundler/bundle_v2.zig b/src/bundler/bundle_v2.zig
index b8854bfc1..90beacd2a 100644
--- a/src/bundler/bundle_v2.zig
+++ b/src/bundler/bundle_v2.zig
@@ -830,7 +830,12 @@ const ParseTask = struct {
}, Logger.Loc{ .start = 0 });
return (try js_parser.newLazyExportAST(allocator, bundler.options.define, opts, log, root, &source, "")).?;
},
- else => return try getEmptyAST(log, bundler, opts, allocator, source),
+ else => {
+ const root = Expr.init(E.String, E.String{
+ .data = source.path.text,
+ }, Logger.Loc{ .start = 0 });
+ return (try js_parser.newLazyExportAST(allocator, bundler.options.define, opts, log, root, &source, "")).?;
+ },
}
}
diff --git a/src/js_printer.zig b/src/js_printer.zig
index 7042694c7..1b9ba9aa0 100644
--- a/src/js_printer.zig
+++ b/src/js_printer.zig
@@ -1777,6 +1777,11 @@ fn NewPrinter(
return;
}
+ if (record.path.is_disabled) {
+ p.printDisabledImport();
+ return;
+ }
+
if (comptime is_bun_platform) {
p.print("import.meta.require");
} else {