v0.25.3
Breaking Changes📦 esbuild
⚠ 1 breaking✨ 3 features🐛 3 fixes🔧 5 symbols
Summary
This release fixes a memory leak in watch mode, adds support for custom hosts in the development server, and improves CSS and JavaScript lowering. It also introduces a safety limit for CSS nesting expansion to prevent resource exhaustion.
⚠️ Breaking Changes
- CSS nesting expansion now has a hard-coded limit (65536 selectors). If your CSS exceeds this limit when targeting older browsers, esbuild will now fail with an error instead of attempting to generate the output.
Migration Steps
- If using a custom domain for development, update your --serve flag or serve() API call to include the specific host (e.g., --serve=local.example.com:8000).
- If your build fails with 'CSS nesting is causing too much expansion', refactor your CSS to reduce nesting depth or selector complexity.
✨ New Features
- Allow a custom host with the development server: You can now opt-in to a single custom domain name for the local development server using --serve=host:port.
- More concise output for repeated legal comments: Duplicate legal comments across separate files are now grouped into a single instance in the output.
- Improved async arrow function lowering: esbuild now avoids forwarding 'this' into generated generator functions if 'this' is not used, allowing async arrow functions before super() in constructors when targeting older environments.
🐛 Bug Fixes
- Fix memory leak with --watch=true: Fixed an issue where using the boolean flag syntax caused the garbage collector to remain disabled during long-lived processes.
- Fix path resolution edge case: Adjusted resolution logic to match Node.js behavior when a path ends with '..' and a directory shares a name with a file.
- Fix lowered async arrow functions before super() where 'this' was incorrectly captured even if unused.
🔧 Affected Symbols
serve--serve--watchcliCSS