2.5. Re-Use Customizations with Plugins
In the previous chapters, you've followed the brand example to learn important concepts related to:
- Creating modules.
- Implementing commerce features in workflows.
- Exposing those features in API routes.
- Customizing the Medusa Admin dashboard with Admin Extensions.
- Integrating third-party systems.
You've implemented the brands example within a single Medusa application. However, this approach is not scalable. If you want to use the same brands feature in different Medusa applications, you would have to manually copy the code and maintain it across all projects.
Instead, to reuse your customizations across multiple Medusa applications, you can create a plugin. A plugin is an NPM package that encapsulates your customizations and can be installed in any Medusa application. Plugins can include modules, workflows, API routes, Admin Extensions, and more.
Medusa provides the tooling to create a plugin package, test it in a local Medusa application, and publish it to NPM.
Refer to the Plugins chapter to learn more about plugins and how to create them.