-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
feat: respect tsconfig options that affects compilation results #4279
Conversation
Title says |
I changed the title to |
@sodatea do you think we could merge this one without Evan's input? It would be good be able to include it in the 2.5 beta |
I think so. This is the standard TypeScript behavior so we'll have to support it anyway. The only problem here is that whether it will break users' projects. So including it in the beta first is a good idea. |
Wait a moment though. I found a typo in my code 😂 |
return cached | ||
} | ||
|
||
let configPath = await findTSConfig(directory) |
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.
Should we check the initial configPath
whether is include in 'process.cwd' ?
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.
Would you open an issue about this so it is easier to track its resolution?
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.
Oh, yes. I'm just not sure about the problem I met is worth solving.
I create a typescript project that doesn't have tsconfig.json
in workspace. And findTSConfig
is trying to recursively find tsconfig.json
and it finds a tsconfig.json
in some parents folder. That tsconfig.json#target
is es5
, so when I run yarn vite
, I get an error for esbuild doesn't support es5, which I knew but doesn't know what causes the error until I look into the code.
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.
I think that's from esbuild, not this PR.
Because in this PR I only add check for 4 fields: jsxFactory
, jsxFragmentFactory
, useDefineForClassFields
, and importsNotUsedAsValues
.
Description
Closes #3227
Additional context
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).