docs: change config snippets to use defineConfig (#7546)

This commit is contained in:
Shahed Nasser
2024-05-30 16:47:28 +03:00
committed by GitHub
parent ddfd757277
commit fe96bd39b1
51 changed files with 489 additions and 718 deletions
@@ -62,13 +62,15 @@ The last step is to add the module in Medusas configurations.
In `medusa-config.js`, add the module to the `modules` object:
```js title="medusa-config.js" highlights={[["2", "helloModuleService", "The key of the main service to be registered in the Medusa container."]]}
const modules = {
helloModuleService: {
resolve: "./dist/modules/hello",
},
// other modules...
}
```js title="medusa-config.js" highlights={[["4", "helloModuleService", "The key of the main service to be registered in the Medusa container."]]}
module.exports = defineConfig({
// ...
modules: {
helloModuleService: {
resolve: "./modules/hello",
}
}
})
```
Its key (`helloModuleService`) is the name of the modules main service. It will be registered in the Medusa container with that name.