Skip to main content
When customizing your Back-end behavior, it is quite common to have to perform the same tasks on multiple Fields and Collections. Plugins are the answer to that need, and you are strongly encouraged to use them everywhere you notice that your customization files could benefit from code factorization.

Using plugins

Plugins are used by either importing a module, or installing the relevant package, and then calling the use method. Depending on the plugin, options may be provided.

Writing plugins

A plugin is nothing more than an async function that performs customizations.

Write your own plugin

Each plugin is nothing more than an async function that can perform customizations at either Back-end level, Collection level, or both.
3 parameters are provided:

Making your plugin act differently depending on the collection

When making a plugin, you may want it to generalize to many different Collections. This can be achieved by adopting different behavior depending on the schema of the Collection being targeted.