-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
feat!: make plugins work multi hooks #94
Conversation
Co-authored-by: Bryce Russell <[email protected]>
Co-authored-by: Jacob Jenkins <[email protected]>
Co-authored-by: Luiz Ferraz <[email protected]>
Co-authored-by: Luiz Ferraz <[email protected]>
✅ Deploy Preview for astro-integration-kit ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for astro-integration-kit ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@Fryuni would you be willing to clean the types at |
@BryceRussell can you check if |
|
Awesome thanks for checking! |
Sure thing. I'll try to reserve some time for it later today or tomorrow |
Awesome thank you! |
Now that plugins can use multiple hooks, what do you think about adding "astro:config:done": (params) => {
return {
hasVitePlugin: (plugin: string | PluginOption) =>
hasVitePlugin(
params as unknown as HookParameters<"astro:config:setup">,
{
plugin,
},
),
};
}, |
In addition to the current hook or as a replacement? |
I like that idea, but I think it should come with a very tiny little refactor to allow a utility to accept params from more than one hook and work the same. Worth an issue for a following PR |
In addition to the current hook
Sounds good, it would be nicer to type this properly. I originally added this to test the changes in the playground and thought it could be an easy thing to support |
Sounds good! Let's track in a distinct issue |
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.
Left a few optimizations and small points, but overall looks awesome.
Co-authored-by: Luiz Ferraz <[email protected]>
Depends on #93, close #44
TODO:
definePlugin