aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/feature_flags.zig2
-rw-r--r--src/js_parser.zig11
2 files changed, 9 insertions, 4 deletions
diff --git a/src/feature_flags.zig b/src/feature_flags.zig
index 130e07d33..0f7e35988 100644
--- a/src/feature_flags.zig
+++ b/src/feature_flags.zig
@@ -23,6 +23,8 @@ pub const bundle_node_modules = true;
pub const tracing = true;
+pub const minify_javascript_string_length = false;
+
pub const verbose_watcher = false;
pub const css_supports_fence = true;
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);
+ }
}
}
},