You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/guide/plugins-and-presets.md
+16Lines changed: 16 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -75,6 +75,22 @@ For example, if you have a `.config/package.json` file:
75
75
```
76
76
:::
77
77
78
+
### Project local plugin
79
+
80
+
If you need access to the plugin API in your project and don't want to create a full plugin for it, you can use the `vuePlugins.service` option in your `package.json` file:
81
+
82
+
```json
83
+
{
84
+
"vuePlugins": {
85
+
"service": ["my-commands.js"]
86
+
}
87
+
}
88
+
```
89
+
90
+
Each file will need to export a function taking the plugin API as the first argument. For more information about the plugin API, check out the [Plugin Development Guide](../dev-guide/plugin-dev.md).
91
+
92
+
You can also create a `vue-cli-ui.js` file that will behave like a UI plugin. For more information, read the [UI Plugin API](../dev-guide/ui-api.md).
93
+
78
94
## Presets
79
95
80
96
A Vue CLI preset is a JSON object that contains pre-defined options and plugins for creating a new project so that the user don't have to go through the prompts to select them.
0 commit comments