docs: document swc dependency for plugins (#11426)

* docs: document swc dependency for plugins

* added llms
This commit is contained in:
Shahed Nasser
2025-02-25 14:30:38 +02:00
committed by GitHub
parent 698a520729
commit 47a963559b
3 changed files with 12586 additions and 12510 deletions

View File

@@ -50,6 +50,8 @@ After the installation is done, the plugin structure will look like this:
## 2. Prepare Plugin
### Package Name
Before developing, testing, and publishing your plugin, make sure its name in `package.json` is correct. This is the name you'll use to install the plugin in your Medusa application.
For example:
@@ -61,6 +63,8 @@ For example:
}
```
### Package Keywords
In addition, make sure that the `keywords` field in `package.json` includes the keyword `medusa-plugin` and `medusa-v2`. This helps Medusa list community plugins on the Medusa website:
```json title="package.json"
@@ -73,6 +77,42 @@ In addition, make sure that the `keywords` field in `package.json` includes the
}
```
### Package Dependencies
<Note>
Your plugin project will already have the dependencies mentioned in this section. If you haven't made any changes to the dependencies, you can skip this section.
</Note>
In the `package.json` file you must have the Medusa dependencies as `devDependencies` and `peerDependencies`. In addition, you must have `@swc/core` as a `devDependency`, as it's used by the plugin CLI tools.
For example, assuming `2.5.0` is the latest Medusa version:
```json title="package.json"
{
"devDependencies": {
"@medusajs/admin-sdk": "2.5.0",
"@medusajs/cli": "2.5.0",
"@medusajs/framework": "2.5.0",
"@medusajs/medusa": "2.5.0",
"@medusajs/test-utils": "2.5.0",
"@medusajs/ui": "4.0.4",
"@medusajs/icons": "2.5.0",
"@swc/core": "1.5.7",
},
"peerDependencies": {
"@medusajs/admin-sdk": "2.5.0",
"@medusajs/cli": "2.5.0",
"@medusajs/framework": "2.5.0",
"@medusajs/test-utils": "2.5.0",
"@medusajs/medusa": "2.5.0",
"@medusajs/ui": "4.0.3",
"@medusajs/icons": "2.5.0",
}
}
```
---
## 3. Publish Plugin Locally for Development and Testing

View File

@@ -111,7 +111,7 @@ export const generatedEditDates = {
"app/learn/fundamentals/module-links/link/page.mdx": "2025-01-06T09:27:25.604Z",
"app/learn/conventions/ts-aliases/page.mdx": "2025-01-23T15:01:15.403Z",
"app/learn/fundamentals/workflows/store-executions/page.mdx": "2025-02-11T15:56:03.835Z",
"app/learn/fundamentals/plugins/create/page.mdx": "2025-02-07T10:26:53.059Z",
"app/learn/fundamentals/plugins/create/page.mdx": "2025-02-12T15:48:25.439Z",
"app/learn/fundamentals/plugins/page.mdx": "2025-01-22T10:14:10.433Z",
"app/learn/customization/reuse-customizations/page.mdx": "2025-01-22T10:01:57.665Z",
"app/learn/update/page.mdx": "2025-01-27T08:45:19.030Z",

File diff suppressed because it is too large Load Diff