Skip to content

crelte / plugins / PluginCreator

Type Alias: PluginCreator()

ts
type PluginCreator = (crelte) => Plugin;

A plugin create function

Each plugin needs to export a createPluginname function which will be called by crelte to create the plugin. If youre plugin has options you can create a configurePluginname function which will be called by youre user and should return a createPlugin function.

Example App.svelte in module="context"

js
import { createPlugin, configurePlugin } from 'some-plugin';

export plugins = [createPlugin, configurePlugin({ enableFeature: true })];

Parameters

crelte

Crelte

Returns

Plugin