|
1
|
--- |
|
2
|
sidebar_label: "Module Options" |
|
3
|
--- |
|
4
|
|
|
5
|
import { Table } from "docs-ui" |
|
6
|
|
|
7
|
export const metadata = { |
|
8
|
title: `Tax Module Options`, |
|
9
|
} |
|
10
|
|
|
11
|
# {metadata.title} |
|
12
|
|
|
13
|
In this guide, you'll learn about the options of the Tax Module. |
|
14
|
|
|
15
|
## providers |
|
16
|
|
|
17
|
The `providers` option is an array of either [tax module providers](../tax-provider/page.mdx) or path to a file that defines a tax provider. |
|
18
|
|
|
19
|
When the Medusa application starts, these providers are registered and can be used to retrieve tax lines. |
|
20
|
|
|
21
|
```ts title="medusa-config.ts" |
|
22
|
import { Modules } from "@medusajs/framework/utils" |
|
23
|
|
|
24
|
// ... |
|
25
|
|
|
26
|
module.exports = defineConfig({ |
|
27
|
// ... |
|
28
|
modules: [ |
|
29
|
{ |
|
30
|
resolve: "@medusajs/tax", |
|
31
|
options: { |
|
32
|
providers: [ |
|
33
|
{ |
|
34
|
resolve: "./path/to/my-provider", |
|
35
|
id: "my-provider", |
|
36
|
options: { |
|
37
|
// ... |
|
38
|
}, |
|
39
|
}, |
|
40
|
], |
|
41
|
}, |
|
42
|
}, |
|
43
|
], |
|
44
|
}) |
|
45
|
``` |
|
46
|
|
|
47
|
The objects in the array accept the following properties: |
|
48
|
|
|
49
|
- `resolve`: A string indicating the package name of the module provider or the path to it. |
|
50
|
- `id`: A string indicating the provider's unique name or ID. |
|
51
|
- `options`: An optional object of the module provider's options. |