-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
chore: Use @preact/preset-vite for Preact templates #2488
Conversation
While this is nice, I somewhat would like to keep the convention of "just using plugins". See #2500 (comment) - I believe you can achieve what the preset is doing with a plugin that returns an array of sub plugins. |
Is there a consensus yet about using this method or the proposed |
@yyx990803 Agree, with your assessment of favoring return an array of plugins. I didn't know this was possible when creating the preset. I'll update the preset to use that and update this PR later today. Happy to have sparked that discussion and to see that everyone came around to work out a fantastic solution! Love this community! |
ca7f96e
to
f383cf3
Compare
@yyx990803 @antfu Published a new version of our preset with your suggested API changes and updated this PR accordingly. |
f383cf3
to
d61d18b
Compare
d61d18b
to
4582332
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for migrating the preset to a plugin, just tested and it worked great!
We've just released a preset for vite so that it's even easier for Preact users to get started with vite. With this we want it to make easier for us to keep the templates up to date and make it less painful for users to upgrade when we add new features to our preset.
Before:
After:
See: https://github.com/preactjs/preset-vite
EDIT: Updated for the new preset version which returns an array of plugins now.