Ah, I think that your test tsproject should include the normal code too!
so, in tsconfig.test.browser.json:
"include": ["vitest.browser.setup.ts", "src"],
There are still lot of edge cases need to be covered like
- Resolving repository package.json/tsconfig
- What happens if a subfolder is a tsproject?
- Refactoring half-assed relative module resolution
- TypeScript aliases
- And probably other shits I can't think of now.