v0.27.1
📦 esbuild
✨ 3 features🐛 2 fixes🔧 5 symbols
Summary
This release fixes bugs in the bundler's variable hoisting and the minifier's label handling, while introducing optimizations for IIFE inlining, empty finally clause removal, and Symbol tree-shaking.
✨ New Features
- Inlining of IIFEs (immediately-invoked function expressions) now works for bodies containing a single expression statement, not just a single return statement.
- The minifier now strips empty finally clauses, which can lead to the removal of the entire try statement if the body is side-effect free.
- Calling the Symbol constructor is now considered side-effect free when the argument is a primitive, allowing for tree-shaking of module-level symbol variables.
🐛 Bug Fixes
- Fixed a bundler bug where top-level 'var' declarations inside 'if' statements were not correctly hoisted when wrapping an ES module for 'require'.
- Fixed a minifier regression where labels were incorrectly moved inside 'try' statements; this transform is now restricted to internal loops generated by the 'for await' transformation.
🔧 Affected Symbols
Symboltryfinallyvarfor await