You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
resolve.tsconfigPaths: true not applied in test environment (Vite 8) #10054
Vite 8 introduces built-in tsconfig path resolution via resolve.tsconfigPaths: true. This works correctly during vite build and vite dev, but vitest does not pick it up — imports using tsconfig paths aliases fail to resolve during test runs.
Hello @ap-justin. Please provide a minimal reproduction using a GitHub repository or StackBlitz (you can also use examples). Issues marked with needs reproduction will be closed if they have no activity within 3 days.
Just going into the StackBlitz reproduction and changing the alias name a bunch, I'm 80% sure it's not related to what the actual makeup of the import alias is.
@AriPerkkio
There is a check failing in the PR pipeline [CI / Browsers: node-24, windows-latest (pull_request)]. This does not seem to be caused by my PR, I think it’s a separate issue. Could you please take a look and review my PR?
Yes, the issue isn’t related to the latest Vite version (vite@8.0.7), it’s a problem with the version specified in the issue description, which is vite@8.0.0
Activity
github-actions commentedon Apr 3, 2026
Hello @ap-justin. Please provide a minimal reproduction using a GitHub repository or StackBlitz (you can also use examples). Issues marked with
needs reproductionwill be closed if they have no activity within 3 days.hi-ogawa commentedon Apr 3, 2026
Can you also prepare full reproduction code?
MdSadiqMd commentedon Apr 3, 2026
Hey @ap-justin are you working on this issue?
If not @hi-ogawa can i work on this?
AriPerkkio commentedon Apr 3, 2026
@MdSadiqMd feel free to help by setting up repository that reproduces the issue.
MdSadiqMd commentedon Apr 4, 2026
Here is a reproduction: https://stackblitz.com/edit/vitest-dev-vitest-ukbynmwb
Expected behavior:
npm run test:run -- test/tsconfig-paths.test.tswithplugins: [tsconfigPaths()]commented out invite.config.ts, the test fails.plugins: [tsconfigPaths()]enabled, all tests passIf this looks good, could you assign this issue to me so I can work on it?
cc: @AriPerkkio
AriPerkkio commentedon Apr 5, 2026
Repro looks good to me.
We don't assign issues, feel free to work on it.
hi-ogawa commentedon Apr 6, 2026
There is/was
#alias issue in Vite 8 vitejs/vite#22038 Could be relevant.Bertie690 commentedon Apr 6, 2026
Just going into the StackBlitz reproduction and changing the alias name a bunch, I'm 80% sure it's not related to what the actual makeup of the import alias is.
MdSadiqMd commentedon Apr 8, 2026
@AriPerkkio
There is a check failing in the PR pipeline [CI / Browsers: node-24, windows-latest (pull_request)]. This does not seem to be caused by my PR, I think it’s a separate issue. Could you please take a look and review my PR?
hi-ogawa commentedon Apr 8, 2026
@MdSadiqMd The reproduction your provided here #10054 (comment) is passing for me locally. Can you check it fails on latest Vite?
MdSadiqMd commentedon Apr 8, 2026
Yes, the issue isn’t related to the latest Vite version (vite@8.0.7), it’s a problem with the version specified in the issue description, which is vite@8.0.0
hi-ogawa commentedon Apr 8, 2026
Closing since this appears to be an upstream issue and fixed on latest Vite.