v0.27.2
Breaking Changes📦 esbuild
⚠ 1 breaking✨ 3 features🐛 1 fixes🔧 4 symbols
Summary
This release adds support for #/ import specifiers, introduces CSS -webkit-mask auto-prefixing, and improves switch statement minification. It also restricts 'using' declarations in switch clauses to align with the latest ECMAScript proposal.
⚠️ Breaking Changes
- Using declarations are no longer allowed directly inside switch case/default clauses due to TC39 specification changes. To fix this, wrap the case body in a block statement using curly braces { }.
Migration Steps
- Identify any switch statements containing 'using' declarations and wrap the case/default bodies in curly braces { } to create a new scope.
✨ New Features
- Allow import path specifiers starting with #/ in package.json, enabling wildcard patterns like mapping #/* to ./src/*.
- Automatically add the -webkit-mask vendor prefix for the CSS mask shorthand property when targeting browsers that require it.
- Enhanced minification for switch statements, such as converting simple switch blocks into ternary expressions.
🐛 Bug Fixes
- Forbid using declarations inside switch clauses to align with the updated Explicit Resource Management specification.
🔧 Affected Symbols
usingmaskswitchpackage.json#imports