docs: document module providers in plugins (#11360)
* docs: document module providers in plugins * small fixes * add missing title
This commit is contained in:
@@ -10,9 +10,18 @@ In this document, you’ll 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: {
|
||||
|
||||
Reference in New Issue
Block a user