Skip to content

Add hook filter rules to vite, rollup and unplugin plugins #171

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
TheAlexLichter opened this issue Apr 30, 2025 · 1 comment
Open

Add hook filter rules to vite, rollup and unplugin plugins #171

TheAlexLichter opened this issue Apr 30, 2025 · 1 comment

Comments

@TheAlexLichter
Copy link

TheAlexLichter commented Apr 30, 2025

With Rolldown being used more and more, Vite and Rollup plugins can be more performant (build speed) by defining hook filters for their used hooks. This will reduce the overhead for communication between the JavaScript and Rust runtimes.

Hook filters are supported in Vite 6.3.0+ and Rollup 4.38.0+, as well as in unplugin

As the hook filters come at "no cost" and applying them is often straightforward, given that some kind of filter is happening in the hook functions, which has to be ported out of the function to the filter object, I thought it could be a great umbrella issue for e18e.

Example PRs:

@Fuzzyma
Copy link
Collaborator

Fuzzyma commented Apr 30, 2025

Let's start with the official plugins: https://github.com/rollup/plugins

@TheAlexLichter TheAlexLichter changed the title Add hook filter rules to vite and rollup plugins Add hook filter rules to vite, rollup and unplugin plugins May 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants