tst-reflect icon indicating copy to clipboard operation
tst-reflect copied to clipboard

[Question] Vite support

Open pablolazaro opened this issue 2 years ago • 3 comments

Hi everyone,

First of all, thanks for the effort of building this library!

I'm looking forward to use it on a Vue project and I was wondering if anyone have some experience using it with a project powered by Vite. I know Vite uses esbuild behind the scenes and given that is not compatible with TypeScript transformers I have to switch to Rollup but, I haven't achieved to make it work properly.

Have any of you a good example of how to use it with Vite?

Thanks in advance!

pablolazaro avatar Mar 30 '23 07:03 pablolazaro

Up !

lsarrazi avatar Jun 09 '23 14:06 lsarrazi

Hi, sorry idk how I missed this.

Neither Vite (esbuild) nor SWC are supported. I have a plan how to make it work, but it's a lot of work; alpha planned for 2024.

Rollup is TypeScript but it transpiles code in a different way so no full support is possible in current state and I didn't test it for a year so idk if it is still at least partly working. Last version of webpack and/or ts-loader seems to work similar to Rollup which means it is quite broken too. Things have been changing fast lately.

I work on new version (see https://github.com/Hookyns/tst-reflect/issues/78) , but because of all those changes I think I will switch to that whole new version which should get all the build and bundle tools working and it will be almost independent so it should be more durable.

Hookyns avatar Jun 09 '23 18:06 Hookyns

I have officially started working on a new version which will make support of esbuild/Vite, SWC etc. possible. Each build system will require its own plugin but it'll be thin; all the hard work is gonna be done by main TS process.

Hookyns avatar Jul 07 '23 07:07 Hookyns