fix(create-vite): use "target": "ES2020" in React template#13147
fix(create-vite): use "target": "ES2020" in React template#13147sapphi-red merged 3 commits intovitejs:mainfrom
"target": "ES2020" in React template#13147Conversation
|
|
|
@ArnaudBarre I found other templates uses |
|
This is clearly is mistake, it should be ES2020 (for lib, the others are mostly decorative given that this is configured in Vite) + useDefineForClassFields |
Ah my bad 😅 |
Wait, so target should remain as ESNext? |
ArnaudBarre
left a comment
There was a problem hiding this comment.
Yeah "module" doesn't bring much and Vite will jump on the new features when they arrive for that so I think this good like this
useDefineForClassFields in React template"target": "ES2020" in React template
Description
Unless I am mistaken, I think this flag was unintentionally dropped in #12604 (cc @ArnaudBarre). This PR restores it for consistency with the other templates.
Additional context
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123).