docs: document module providers in plugins (#11360)

* docs: document module providers in plugins

* small fixes

* add missing title
This commit is contained in:
Shahed Nasser
2025-02-07 14:17:14 +02:00
committed by GitHub
parent acc1e8e262
commit 5c44811cb0
14 changed files with 9950 additions and 9663 deletions

View File

@@ -10,9 +10,18 @@ In this document, youll learn how to create a file provider module and the me
---
## 1. Create Module Directory
## Create Module Provider Directory
Start by creating a new directory for your module. For example, `src/modules/my-file`.
Start by creating a new directory for your module provider.
If you're creating the module provider in a Medusa application, create it under the `src/modules` directory. For example, `src/modules/my-file`.
If you're creating the module provider in a plugin, create it under the `src/providers` directory. For example, `src/providers/my-file`.
<Note>
The rest of this guide always uses the `src/modules/my-file` directory as an example.
</Note>
---
@@ -251,6 +260,7 @@ module.exports = defineConfig({
id: "local",
},
{
// if module provider is in a plugin, use `plugin-name/providers/my-file`
resolve: "./src/modules/my-file",
id: "my-file",
options: {