-
-
Notifications
You must be signed in to change notification settings - Fork 7.2k
Closed
Labels
breaking changep3-significantHigh priority enhancement (priority)High priority enhancement (priority)
Milestone
Description
Description
The current default build.target
is a bit outdated.
es2020
edge88
firefox78
chrome87
safari14
The reasons why this should be bumped:
- this support range requires optional chaining to be transpiled causing the bundle size to be bigger
- AFAIK we didn't want to transpile optional chaining
- caniuse shows that Chrome 80+, Edge 80+, Firefox 74+, Safari 13.1+ supports it, but esbuild transpiles it unless the target is Chrome 91+ due to Chrome's bug ("spread parameters after optional chaining" works in Chrome 91 compat-table/compat-table#1737)
- (this is the reason I noticed)
- this support range requires logical assignments to be transpiled
- esbuild transpiles it unless target is ES2021+, Chrome 85+, Firefox 79+, Safari 14+.
- it is not common to write this operator by hand, but it's useful for minifiers
Suggested solution
I propose bumping the target to:
es2021
edge91
firefox79
chrome91
safari14
this allows optional chaining and logical assignments to be kept as-is.
Maybe it can be bumped further more, but I think we should bump to this range at least.
I also propose renaming the special 'modules'
target to 'defaults'
as it has been used as a default / recommended rather than the modules target (chrome60,firefox60,safari11
).
Alternative
No response
Additional context
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
bluwy, clemstoquart, nulladdict and Tamas-hi
Metadata
Metadata
Assignees
Labels
breaking changep3-significantHigh priority enhancement (priority)High priority enhancement (priority)
Type
Projects
Status
Has plan