chore: Use @preact/preset-vite for Preact templates#2488
chore: Use @preact/preset-vite for Preact templates#2488yyx990803 merged 2 commits intovitejs:mainfrom
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
patak-cat
left a comment
There was a problem hiding this comment.
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.