Allows defining a type-safe plugin that can be used in defineIntegration
.
You can then use it in withPlugins
:
Limitations
- Plugins support overrides. That means that if 2 plugins declare the same
name
, the latest will be kept.
Practical examples
Astro Integration Kit uses definePlugin
for its core plugins under the hood,
have a look at our source for practical examples!