You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+16Lines changed: 16 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -281,6 +281,22 @@
281
281
}
282
282
```
283
283
284
+
* Improve tree-shaking of `try` statements in dead code ([#4224](https://github.com/evanw/esbuild/issues/4224))
285
+
286
+
With this release, esbuild will now remove certain `try` statements if esbuild considers them to be within dead code (i.e. code that is known to not ever be evaluated). For example:
287
+
288
+
```js
289
+
// Original code
290
+
return'foo'
291
+
try { return'bar' } catch {}
292
+
293
+
// Old output (with --minify)
294
+
return"foo";try{return"bar"}catch{}
295
+
296
+
// New output (with --minify)
297
+
return"foo";
298
+
```
299
+
284
300
* Update Go from 1.23.5 to 1.23.7 ([#4076](https://github.com/evanw/esbuild/issues/4076), [#4077](https://github.com/evanw/esbuild/pull/4077))
285
301
286
302
This should have no effect on existing code as this version change does not change Go's operating system support. It may remove certain reports from vulnerability scanners that detect which version of the Go compiler esbuild uses.
0 commit comments