aboutsummaryrefslogtreecommitdiff
path: root/src/js_printer.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/js_printer.zig')
-rw-r--r--src/js_printer.zig10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/js_printer.zig b/src/js_printer.zig
index c73e03464..3bdeb09ba 100644
--- a/src/js_printer.zig
+++ b/src/js_printer.zig
@@ -2485,7 +2485,7 @@ pub fn NewPrinter(
// Object.assign(__export, {prop1, prop2, prop3});
else => {
if (comptime is_inside_bundle) {
- p.printSymbol(p.options.runtime_imports.__exportValue.?.ref);
+ p.printSymbol(p.options.runtime_imports.__export.?.ref);
} else {
p.print("Object.assign");
}
@@ -2497,8 +2497,12 @@ pub fn NewPrinter(
for (s.items) |item, i| {
const name = p.renamer.nameForSymbol(item.name.ref.?);
p.printClauseAlias(item.alias);
-
- if (!strings.eql(name, item.alias)) {
+ if (comptime is_inside_bundle) {
+ p.print(":");
+ p.printSpace();
+ p.print("() => ");
+ p.printIdentifier(name);
+ } else if (!strings.eql(name, item.alias)) {
p.print(":");
p.printSpace();
p.printIdentifier(name);