diff options
author | 2023-08-24 23:00:42 -0700 | |
---|---|---|
committer | 2023-08-24 23:00:53 -0700 | |
commit | 16b4bf341acc0f4804f0b6bdf5298c180cd00366 (patch) | |
tree | bb2dbbf4e92d4a9b5feec1f6de0d9772d891b36a /src/js_parser.zig | |
parent | 1480889205d49cf7221a36608a8896b452967cea (diff) | |
download | bun-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.zig | 11 |
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); + } } } }, |