vitest-dev / vitest-dev/vitest
tsconfigRaw using rolldown vitest
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 17.1k
- Forks
- 2k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 94
Description
Describe the bug
I want to use a different tsconfig.json depending on the context. But since 4.1, vitest uses rolldown or esbuild.
plugins: [tsconfigPaths({
projects: [isProd ? './tsconfig.prod.json' : './tsconfig.json'],
})],
esbuild: {
tsconfigRaw: isProd ? JSON.stringify(tsconfigProd) : JSON.stringify(tsconfigDev),
},
Until now I was using this technique to inject the contents of the file and enable the resolution of the paths, but now tsconfigRaw is no longer available.
Reproduction
esbuild no longer contains the key tsconfigRaw.
System Info
System:
OS: macOS 26.4.1
CPU: (8) arm64 Apple M1 Pro
Memory: 109.69 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 24.15.0 - /Users/rubnogueira/.local/share/mise/installs/node/24/bin/node
Yarn: 4.14.1 - /Users/rubnogueira/.local/share/mise/installs/yarn/4.14.1/bin/yarn
npm: 11.12.1 - /Users/rubnogueira/.local/share/mise/installs/node/24/bin/npm
pnpm: 10.33.1 - /Users/rubnogueira/.local/share/mise/installs/pnpm/10.33.1/pnpm
bun: 1.3.13 - /Users/rubnogueira/.local/share/mise/installs/bun/latest/bin/bun
npmPackages:
@vitest/coverage-v8: ^4.0.18 => 4.1.4
vitest: ^4.0.18 => 4.1.4
Used Package Manager
pnpm
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported configuration with Vitest 4.1.4, comparing the esbuild and rolldown paths and checking where tsconfigRaw is handled. Trace the relevant Vitest configuration entry point and verify that the selected tsconfig can be passed through while preserving path resolution; done means the supplied production and development configurations work again.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- build-system, testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 56/100