aleclarson / vite-tsconfig-paths

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

v4 doesn't work on Windows #85

Closed joshwooding closed 1 year ago

joshwooding commented 1 year ago

Same issue as https://github.com/aleclarson/vite-tsconfig-paths/issues/77#issuecomment-1344282638

maxwellwalin commented 1 year ago

Same issue here. Not able to resolve modules imported with baseUrl: 'src'

pgross41 commented 1 year ago

I'm also experiencing this issue, I stepped through and found a problem here: https://github.com/aleclarson/vite-tsconfig-paths/blob/7bf13ee94df37eff47ede3f0bf6f02cad55c02e2/src/index.ts#L107

resolversByDir is keyed with backslashes but projectDir is a forward-slash. I'm using TypeScript v4.9.4.

joshwooding commented 1 year ago

@pgross41 I have a PR up to fix the issue