Function: definePlugin()
definePlugin<
Config,Ctx>(definition): (...config) =>Plugin
Checks a plugin definition and returns a factory: calling it with the config gives an entry for opts.plugins. A plugin whose config is all optional can be called with no arguments.
Type Parameters
Config
Config = void
Ctx
Ctx = undefined
Parameters
definition
PluginDefinition<Config, Ctx>
Returns
(...config) => Plugin