Plugin Hook Filters for Vite Plugin
Hey 👋
Glad to see the support for Rolldown and Vite.
I've noticed that the Vite plugin transform hook has no hook filter (unlike the Rolldown plugin). Adding it would improve performance with rolldown-vite (and the next Vite major version).
They are backwards-compatible (leave the function check in for full bw compat and older Vite versions if needed), and also available in Rollup!
See also:
- https://vite.dev/guide/rolldown.html#hook-filter-feature
- https://github.com/e18e/ecosystem-issues/issues/171
PS: If you consider unifying the plugin architecture, you might want to take a look at https://github.com/unjs/unplugin
Hi, thanks for the tip.
If you consider unifying the plugin architecture, you might want to take a look at https://github.com/unjs/unplugin
Unfortunately, ivi compiler has a "whole program optimization" pass that depends on the renderChunk hook that isn't available in the unplugin library. And as I understand, bundlers like esbuild, bun, etc doesn't provide any hooks with a similar behavior.