Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: use require instead of import in medusa-config.js #9102

Merged
merged 2 commits into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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"
import { Modules } from "@medusajs/utils"
const { Modules } = require("@medusajs/utils")

// ...

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Make sure that the version added in `package.json` is `preview` to avoid errors
Next, add the module into the `modules` property of the exported object in `medusa-config.js`:

```js title="medusa-config.js"
import { Modules } from "@medusajs/utils"
const { Modules } = require("@medusajs/utils")

// ...

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const highlights = [
]

```js title="medusa-config.js" highlights={highlights}
import { Modules } from "@medusajs/utils"
const { Modules } = require("@medusajs/utils")

// ...

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ To use your Event Module, add it to the `modules` object exported as part of the
For example:

```js title="medusa-config.js"
import { Modules } from "@medusajs/utils"
const { Modules } = require("@medusajs/utils")

// ...

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Make sure that the version added in `package.json` is `preview` to avoid errors
Next, add the module into the `modules` property of the exported object in `medusa-config.js`:

```js title="medusa-config.js"
import { Modules } from "@medusajs/utils"
const { Modules } = require("@medusajs/utils")

// ...

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const highlights = [
]

```js title="medusa-config.js"
import { Modules } from "@medusajs/utils"
const { Modules } = require("@medusajs/utils")

// ...

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ The File Module accepts one provider only.
</Note>

```js title="medusa-config.js"
import { Modules } from "@medusajs/utils"
const { Modules } = require("@medusajs/utils")

// ...

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ The File Module accepts one provider only.
</Note>

```js title="medusa-config.js"
import { Modules } from "@medusajs/utils"
const { Modules } = require("@medusajs/utils")

// ...

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Only one provider can be defined for a channel.
</Note>

```js title="medusa-config.js"
import { Modules } from "@medusajs/utils"
const { Modules } = require("@medusajs/utils")

// ...

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ When you send a notification, you specify the channel to send it through, such a
For example:

```js title="medusa-config.js" highlights={[["19"]]}
import { Modules } from "@medusajs/utils"
const { Modules } = require("@medusajs/utils")

// ...

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Only one provider can be defined for a channel.
</Note>

```js title="medusa-config.js"
import { Modules } from "@medusajs/utils"
const { Modules } = require("@medusajs/utils")

// ...

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Make sure that the version added in `package.json` is `preview` to avoid errors
Next, add the module into the `modules` property of the exported object in `medusa-config.js`:

```js title="medusa-config.js"
import { Modules } from "@medusajs/utils"
const { Modules } = require("@medusajs/utils")

// ...

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const highlights = [
]

```js title="medusa-config.js" highlights={highlights}
import { Modules } from "@medusajs/utils"
const { Modules } = require("@medusajs/utils")

// ...

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The Emailpass auth provider is registered by default with the Auth Module.
If you want to pass options to the provider, add the provider to the `providers` option of the Auth Module:

```js title="medusa-config.js"
import { Modules } from "@medusajs/utils"
const { Modules } = require("@medusajs/utils")

// ...

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ npm install @medusajs/auth-github@preview
Next, add the module to the array of providers passed to the Auth Module:

```js title="medusa-config.js"
import { Modules } from "@medusajs/utils"
const { Modules } = require("@medusajs/utils")

// ...

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ npm install @medusajs/auth-google@preview
Next, add the module to the array of providers passed to the Auth Module:

```js title="medusa-config.js"
import { Modules } from "@medusajs/utils"
const { Modules } = require("@medusajs/utils")

// ...

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ When the Medusa application starts, these providers are registered and can be us
For example:

```js title="medusa-config.js"
import { Modules } from "@medusajs/utils"
const { Modules } = require("@medusajs/utils")

// ...

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ When the Medusa application starts, these providers are registered and can be us
For example:

```js title="medusa-config.js"
import { Modules } from "@medusajs/utils"
const { Modules } = require("@medusajs/utils")

// ...

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ When the Medusa application starts, these providers are registered and can be us
For example:

```js title="medusa-config.js"
import { Modules } from "@medusajs/utils"
const { Modules } = require("@medusajs/utils")

// ...

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Make sure that the version added in `package.json` is `preview` to avoid errors
Next, add the module to the array of providers passed to the Payment Module:

```js title="medusa-config.js"
import { Modules } from "@medusajs/utils"
const { Modules } = require("@medusajs/utils")

// ...

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The `providers` option is an array of either tax module providers, tax plugins,
When the Medusa application starts, these providers are registered and can be used to retrieve tax lines.

```js title="medusa-config.js"
import { Modules } from "@medusajs/utils"
const { Modules } = require("@medusajs/utils")

// ...

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ In this document, you'll learn about the options of the User Module.
## Module Options

```js title="medusa-config.js"
import { Modules } from "@medusajs/utils"
const { Modules } = require("@medusajs/utils")

// ...

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ For example, add the following dependencies in `package.json` for the Cache, Eve
Then, add these modules in `medusa-config.js`:

```js title="medusa-config.js"
import { Modules } from "@medusajs/utils"
const { Modules } = require("@medusajs/utils")

module.exports = defineConfig({
// ...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1506,9 +1506,7 @@ Finally, register the module provider in `medusa-config.js`:

```js title="medusa-config.js"
// other imports...
import {
Modules,
} from "@medusajs/utils"
const { Modules } = require("@medusajs/utils")

module.exports = defineConfig({
modules: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ This exports the module's definition, indicating that the \`MyAuthProviderServic
To use your Auth Module Provider, add it to the \`providers\` array of the Auth Module:

\`\`\`js title="medusa-config.js"
import { Modules } from "@medusajs/utils"
const { Modules } = require("@medusajs/utils")

// ...

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ The File Module accepts one provider only.
</Note>

\`\`\`js title="medusa-config.js"
import { Modules } from "@medusajs/utils"
const { Modules } = require("@medusajs/utils")

// ...

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ This exports the module's definition, indicating that the \`MyFulfillmentProvide
To use your Fulfillment Module Provider, add it to the \`providers\` array of the Fulfillment Module:

\`\`\`js title="medusa-config.js"
import { Modules } from "@medusajs/utils"
const { Modules } = require("@medusajs/utils")

// ...

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ The Notification Module accepts one provider per channel.
</Note>

\`\`\`js title="medusa-config.js"
import { Modules } from "@medusajs/utils"
const { Modules } = require("@medusajs/utils")

// ...

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ This exports the module's definition, indicating that the \`MyPaymentProviderSer
To use your Payment Module Provider, add it to the \`providers\` array of the Payment Module:

\`\`\`js title="medusa-config.js"
import { Modules } from "@medusajs/utils"
const { Modules } = require("@medusajs/utils")

// ...

Expand Down
Loading