docs: Improve Loaders documentation (#5205)
This commit is contained in:
@@ -39,12 +39,12 @@ When the loader is defined in a module, it receives the following parameters:
|
||||
For example, this loader function resolves the `ProductService` and logs in the console the count of products in the Medusa backend:
|
||||
|
||||
```ts title=src/loaders/my-loader.ts
|
||||
import { ProductService } from "@medusajs/medusa"
|
||||
import { ProductService, ConfigModule } from "@medusajs/medusa"
|
||||
import { AwilixContainer } from "awilix"
|
||||
|
||||
export default async (
|
||||
container: AwilixContainer,
|
||||
config: Record<string, unknown>
|
||||
config: ConfigModule
|
||||
): Promise<void> => {
|
||||
console.info("Starting loader...")
|
||||
const productService = container.resolve<ProductService>(
|
||||
|
||||
Reference in New Issue
Block a user