aleclarson / vite-tsconfig-paths

Support for TypeScript's path mapping in Vite
MIT License
1.34k stars 50 forks source link

Defining `include` while extending from a tsconfig that has `"files": []` or `"include": []` causes nothing to happen #164

Closed jdharrisnz closed 3 days ago

jdharrisnz commented 1 week ago

I'm using this plugin in a repo with TypeScript project references set up. The root tsconfig is the "solution" file that defines type checking and transformation rules, while each project directory extends from it. The root uses "files": [], however this seems to cause transformations not to happen.

Reproduction: https://github.com/jdharrisnz/8f0a73b9-9da1-40fd-8587-a0434aaf82a4

I'm using the tsc compiler with project references to build the project, but there's an element of my project for which I just want to run ad-hoc scripts via vite-node, and that's where this is choking.

aleclarson commented 1 week ago

Add a minimal reproduction to test fixtures (see other fixtures for guidance) and submit a PR. I will take a look then.

jdharrisnz commented 1 week ago

Added the PR #166 and deleted the above-linked repo

aleclarson commented 3 days ago

I investigated a bit. This is a duplicate of #150, and it has nothing to do with empty files or include arrays. See my comment to understand what's happening. It's an upstream bug with tsconfck.

edit: To clarify, much of the linked comment is unrelated to your issue. The part about fixing the extends logic in tsconfck is relevant, however.