docs: update imports and package names across docs (#9375)

* docs: update imports and package names across docs
+ reference configs

* generate files

* fix import

* change preview to rc
This commit is contained in:
Shahed Nasser
2024-10-01 12:03:42 +03:00
committed by GitHub
parent c726ed54f5
commit 2e16949979
196 changed files with 1379 additions and 1491 deletions
@@ -16,10 +16,10 @@ Start by creating a new directory for your module. For example, `src/modules/my-
Create the file `src/modules/my-cache/service.ts` that holds the implementation of the cache service.
The Cache Module's main service must implement the `ICacheService` interface imported from `@medusajs/types`:
The Cache Module's main service must implement the `ICacheService` interface imported from `@medusajs/framework/types`:
```ts title="src/modules/my-cache/service.ts"
import { ICacheService } from "@medusajs/types"
import { ICacheService } from "@medusajs/framework/types"
class MyCacheService implements ICacheService {
get<T>(key: string): Promise<T> {
@@ -135,7 +135,7 @@ Create the file `src/modules/my-cache/index.ts` with the following content:
```ts title="src/modules/my-cache/index.ts"
import MyCacheService from "./service"
import { Module } from "@medusajs/utils"
import { Module } from "@medusajs/framework/utils"
export default Module("my-cache", {
service: MyCacheService,
@@ -153,7 +153,7 @@ To use your Cache Module, add it to the `modules` object exported as part of the
For example:
```js title="medusa-config.js"
const { Modules } = require("@medusajs/utils")
const { Modules } = require("@medusajs/framework/utils")
// ...