aboutsummaryrefslogtreecommitdiff
path: root/src/js_parser.zig
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-08-24 23:00:42 -0700
committerGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-08-24 23:00:53 -0700
commit16b4bf341acc0f4804f0b6bdf5298c180cd00366 (patch)
treebb2dbbf4e92d4a9b5feec1f6de0d9772d891b36a /src/js_parser.zig
parent1480889205d49cf7221a36608a8896b452967cea (diff)
downloadbun-16b4bf341acc0f4804f0b6bdf5298c180cd00366.tar.gz
bun-16b4bf341acc0f4804f0b6bdf5298c180cd00366.tar.zst
bun-16b4bf341acc0f4804f0b6bdf5298c180cd00366.zip
Disable minifying "str".length until https://github.com/oven-sh/bun/issues/4217 is fixed
Diffstat (limited to 'src/js_parser.zig')
-rw-r--r--src/js_parser.zig11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/js_parser.zig b/src/js_parser.zig
index 68e45ace2..6351aa33b 100644
--- a/src/js_parser.zig
+++ b/src/js_parser.zig
@@ -17050,10 +17050,13 @@ fn NewParser_(
}
},
.e_string => |str| {
- if (p.options.features.minify_syntax) {
- // minify "long-string".length to 11
- if (strings.eqlComptime(name, "length")) {
- return p.newExpr(E.Number{ .value = @as(f64, @floatFromInt(str.javascriptLength())) }, loc);
+ // Disable until https://github.com/oven-sh/bun/issues/4217 is fixed
+ if (comptime FeatureFlags.minify_javascript_string_length) {
+ if (p.options.features.minify_syntax) {
+ // minify "long-string".length to 11
+ if (strings.eqlComptime(name, "length")) {
+ return p.newExpr(E.Number{ .value = @as(f64, @floatFromInt(str.javascriptLength())) }, loc);
+ }
}
}
},