aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/javascript.zig
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2022-09-06 17:24:45 -0700
committerGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2022-09-06 17:24:45 -0700
commitbac93e14ad5dcf6c5c0806cc23579ce0583aa0c6 (patch)
treebf296b20dbf43f880dc13fcdd02ce9a5628c1450 /src/bun.js/javascript.zig
parent1454e448e69ed492fcad93f448aaa686c7c858dd (diff)
downloadbun-bac93e14ad5dcf6c5c0806cc23579ce0583aa0c6.tar.gz
bun-bac93e14ad5dcf6c5c0806cc23579ce0583aa0c6.tar.zst
bun-bac93e14ad5dcf6c5c0806cc23579ce0583aa0c6.zip
Fix bug with macros
Diffstat (limited to '')
-rw-r--r--src/bun.js/javascript.zig18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/bun.js/javascript.zig b/src/bun.js/javascript.zig
index a7b0b6ec3..c4a5ff8d3 100644
--- a/src/bun.js/javascript.zig
+++ b/src/bun.js/javascript.zig
@@ -1008,16 +1008,14 @@ pub const VirtualMachine = struct {
} else if (specifier.len > js_ast.Macro.namespaceWithColon.len and
strings.eqlComptimeIgnoreLen(specifier[0..js_ast.Macro.namespaceWithColon.len], js_ast.Macro.namespaceWithColon))
{
- if (comptime !disable_transpilying) {
- if (jsc_vm.macro_entry_points.get(MacroEntryPoint.generateIDFromSpecifier(specifier))) |entry| {
- return ResolvedSource{
- .allocator = null,
- .source_code = ZigString.init(entry.source.contents),
- .specifier = ZigString.init(specifier),
- .source_url = ZigString.init(specifier),
- .hash = 0,
- };
- }
+ if (jsc_vm.macro_entry_points.get(MacroEntryPoint.generateIDFromSpecifier(specifier))) |entry| {
+ return ResolvedSource{
+ .allocator = null,
+ .source_code = ZigString.init(entry.source.contents),
+ .specifier = ZigString.init(specifier),
+ .source_url = ZigString.init(specifier),
+ .hash = 0,
+ };
}
}