Skip to content

docs: clarify tsconfig resolution behavior#21179

Merged
sapphi-red merged 3 commits into
vitejs:mainfrom
sapphi-red:docs/clarify-tsconfig-resolution-behavior
Dec 2, 2025
Merged

docs: clarify tsconfig resolution behavior#21179
sapphi-red merged 3 commits into
vitejs:mainfrom
sapphi-red:docs/clarify-tsconfig-resolution-behavior

Conversation

@sapphi-red
Copy link
Copy Markdown
Member

@sapphi-red sapphi-red commented Dec 1, 2025

Clarified how the tsconfigs are resolved and which field are respected.
Thought about clarifying this while working on vitejs#529

@sapphi-red sapphi-red added the documentation Improvements or additions to documentation label Dec 1, 2025
Comment thread docs/guide/features.md Outdated
Comment thread docs/guide/features.md Outdated
@sapphi-red sapphi-red merged commit ab0c3b2 into vitejs:main Dec 2, 2025
12 checks passed
@sapphi-red sapphi-red deleted the docs/clarify-tsconfig-resolution-behavior branch December 2, 2025 05:46
@bluwy
Copy link
Copy Markdown
Member

bluwy commented Dec 2, 2025

Ah, I didn't know about that. It seems rolldown-vite has the same behavior now. https://stackblitz.com/edit/vitejs-vite-decgds3u?file=src%2Fmain.ts,counter.ts,package.json,tsconfig.json&terminal=dev

I did some checks again and I notice that if the nearest tsconfig.json, even if it didn't include the file, but other files that are included import that file, the tsconfig would also apply to that file too. So I guess this makes the compatibility even more complex, not quite sure how to handle that.

@sapphi-red
Copy link
Copy Markdown
Member Author

Oh, that's a weird behavior. I guess it's fine for now as long as the cases where the files are included.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants