Open mnpenner opened 10 months ago
Same here (bun 1.0.18). The path is evaluated (nonexistent path will cause an error), but the file content is ignored and the root tsconfig.json is loaded. This can be verified by providing a syntactically invalid file which will not cause a message. Putting a syntax error in the root tsconfig.json will cause a warning in either case.
Issue title should be changed because the issue is not related to JSX.
I can confirm this is still an issue in bun v1.1.21 on MacOS 14.6:
bun run --tsconfig-override=tsconfig.server.json ./file.ts
doesn't respect the compilerOptions.paths
defined in tsconfig.server.json
, but they work if I put them in tsconfig.json
instead.
What version of Bun is running?
1.0.11+f7f6233ea
What platform is your computer?
Linux 4.4.0-19041-Microsoft x86_64 x86_64
What steps can reproduce the bug?
My project is structured like this:
In
server/tsconfig.json
I have:In the root
tsconfig.json
I have:When I run
bun run --tsconfig-override server/tsconfig.json --hot server/server.tsx
I get an error:But as you will notice, I have
jsxImportSource
set inserver/tsconfig.json
but Bun isn't using it for some reason, even though I explicitly told it to use that tsconfig with--tsconfig-override
.If I add
to the root tsconfig, then it works fine. So for whatever reason, Bun seems to be not using the correct tsconfig, even when I explicitly try to set it.
What is the expected behavior?
Use the tsconfig specified with
--tsconfig-override
, or even better, automatically use the correct tsconfig (closest to the file I'm trying to run, not cwd)What do you see instead?
Error.
Additional information
No response