Skip to content

Commit

Permalink
Add version property to Plugin type (#4771)
Browse files Browse the repository at this point in the history
  • Loading branch information
Septh committed Dec 28, 2022
1 parent 0d543a2 commit 57fa7e0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
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

0 comments on commit 57fa7e0

Please sign in to comment.