docs: change config snippets to use defineConfig (#7546)
This commit is contained in:
@@ -12,6 +12,12 @@ The Local Notification Provider Module simulates sending a notification, but onl
|
||||
|
||||
## Install the Local Notification Module
|
||||
|
||||
<Note>
|
||||
|
||||
The Local Notification Provider Module is installed by default in your application.
|
||||
|
||||
</Note>
|
||||
|
||||
To install the Local Notification Provider Module, run the following command in the directory of your Medusa application:
|
||||
|
||||
```bash npm2yarn
|
||||
@@ -27,10 +33,13 @@ Only one provider can be defined for a channel.
|
||||
</Note>
|
||||
|
||||
```js title="medusa-config.js"
|
||||
module.exports = {
|
||||
const { Modules } = require("@medusajs/modules-sdk")
|
||||
|
||||
// ...
|
||||
|
||||
module.exports = defineConfig({
|
||||
// ...
|
||||
modules: {
|
||||
// ...
|
||||
[Modules.NOTIFICATION]: {
|
||||
resolve: "@medusajs/notification",
|
||||
options: {
|
||||
@@ -49,8 +58,8 @@ module.exports = {
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
### Local Notification Module Options
|
||||
|
||||
@@ -30,7 +30,11 @@ When you send a notification, you specify the channel to send it through, such a
|
||||
|
||||
For example:
|
||||
|
||||
```js title="medusa-config.js" highlights={[["15"]]}
|
||||
```js title="medusa-config.js" highlights={[["19"]]}
|
||||
const { Modules } = require("@medusajs/modules-sdk")
|
||||
|
||||
// ...
|
||||
|
||||
module.exports = {
|
||||
// ...
|
||||
modules: {
|
||||
|
||||
@@ -35,10 +35,13 @@ Only one provider can be defined for a channel.
|
||||
</Note>
|
||||
|
||||
```js title="medusa-config.js"
|
||||
module.exports = {
|
||||
const { Modules } = require("@medusajs/modules-sdk")
|
||||
|
||||
// ...
|
||||
|
||||
module.exports = defineConfig({
|
||||
// ...
|
||||
modules: {
|
||||
// ...
|
||||
[Modules.NOTIFICATION]: {
|
||||
resolve: "@medusajs/notification",
|
||||
options: {
|
||||
@@ -59,8 +62,8 @@ module.exports = {
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
### Environment Variables
|
||||
|
||||
Reference in New Issue
Block a user