aleclarson / vite-tsconfig-paths

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

Allow other type extensions, not only `tsx` #74

Closed websolutions-hamburg closed 2 years ago

websolutions-hamburg commented 2 years ago

Hello,

this is a great plugin. We like to use it with a project, where we use *.mts files. Unfortunately, the plugin only allows the use of files with the extension *`.tsx`**: https://github.com/aleclarson/vite-tsconfig-paths/blob/8e5a382a8f03233504ca391ea4c2119ffbc746b7/src/index.ts#L110

Would it be possible to use other file extensions such as *.mts or *.ts?

aleclarson commented 2 years ago

Fixed in 3.6.0

Note: .ts files were already supported. The x is optional in that regexp.