Skip to content

Is there a reasonable way to run transforms like this on the output after module resolution is complete? #587

Closed Answered by ArnaudBarre
spalger asked this question in Q&A
Discussion options

You must be logged in to vote

The builtin import transformation plugin runs very late in the pipeline, I'm not 100% you can run a plugin after that.
Also I think this plugin can only work on JS files, so you would need to run SWC first for the pipeline to work (to remove TS and JSX).

Probably @sapphi-red have a deeper knowledge but running something after the import transformation is not usual.

Are you doing this only for performance issues? If so what are you current performance bottleneck? With rolldown-vite you can already get quite a fast startup that caching can become unnecessary.

In my testing with "normal" Vite the SWC transform is not the bottleneck so caching this is not very effective (I experimented but ne…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by spalger
Comment options

You must be logged in to vote
2 replies
@ArnaudBarre
Comment options

@spalger
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants