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

Add 'version' property on Plugin type #4771

Merged
merged 1 commit into from Dec 28, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/05-plugin-development.md
Expand Up @@ -64,6 +64,12 @@ export default ({

The name of the plugin, for use in error messages and warnings.

#### `version?`

**Type:** `string | undefined`

The version of the plugin, for use in inter-plugin communication scenarios.

### Build Hooks

To interact with the build process, your plugin object includes "hooks". Hooks are functions which are called at various stages of the build. Hooks can affect how a build is run, provide information about a build, or modify a build once complete. There are different kinds of hooks:
Expand Down
1 change: 1 addition & 0 deletions src/rollup/types.d.ts
Expand Up @@ -456,6 +456,7 @@ export interface OutputPlugin
Partial<{ [K in AddonHooks]: ObjectHook<AddonHook> }> {
cacheKey?: string;
name: string;
version?: string;
}

export interface Plugin extends OutputPlugin, Partial<PluginHooks> {
Expand Down