florian-lefebvre / astro-integration-kit

A package that contains utilities to help you build Astro integrations.

Home Page:https://astro-integration-kit.netlify.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Plugins: allow using other plugins

florian-lefebvre opened this issue · comments

A plugin may define a dependency on another plugin, an idea of API:

import { otherPlugin } from "./other-plugin.js"

export const dependentPlugin = definePlugin({
	name: "foo",
	hook: "astro:config:setup",
	dependsOn: [otherPlugin],
	implementation: ({ otherPluginName }) => () => {}
})