aleclarson / vite-tsconfig-paths

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

Question: Is this intended to also work with `vitest typecheck`? #126

Closed b0o closed 8 months ago

b0o commented 8 months ago

My tsconfig has the following paths config:

"paths": {
  "#/*": ["./src/*"]
}

My foo.test.ts file uses imports like:

import { foo } from '#/foo'

Running my test with vitest run works just fine, but running with vitest typecheck throws loads of errors because it seems it isn't able to resolve the '#/foo' import. Switching to relative paths fixes the issue.

Is this the intended behavior?

b0o commented 8 months ago

I'm not sure what I did, but I reverted back to '#/foo' and it works again... :woman_facepalming: