-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: clarify target
in tsconfig.json
#18377
docs: clarify target
in tsconfig.json
#18377
Conversation
Run & review this pull request in StackBlitz Codeflow. |
@@ -88,12 +88,13 @@ But a few libraries haven't transitioned to this new default yet, including [`li | |||
|
|||
- [TypeScript documentation](https://www.typescriptlang.org/tsconfig#target) | |||
|
|||
Vite does not transpile TypeScript with the configured `target` value by default, following the same behaviour as `esbuild`. | |||
Vite ignores the `target` value in the `tsconfig.json`, following the same behavior as `esbuild`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually target
is used to derive the default value of useDefineForClassFields
, but I think it's more easy to understand if we say "ignore" here even if it's a bit of lie.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should add a per environment dev.target
(equivalent to build.target
) so we start preparing the ground for Rolldown with this defined in Vite's side and not on the esbuild options.
Wouldn't Maybe we can do that if perf is not an issue anymore for better expectations. Otherwise we have to educate users to use |
Maybe it should be with another name then. I'm thinking more about the need for this value to be under vite's config instead of esbuild if we migrate to Rolldown, or we'll need to tell them at that point to migrate their esbuild config to Rolldown config. |
Description
close #16334