Skip to content

Interface: FunctionPluginHooks

Defined in: plugin/index.ts:106

Properties

augmentChunkHash()

  • Type: augmentChunkHash: (this, chunk) => string | void
Defined in: plugin/index.ts:184

Parameters

this

PluginContext

chunk

RenderedChunk

Returns

string | void


buildEnd()

  • Type: buildEnd: (this, err?) => void
Defined in: plugin/index.ts:160

Parameters

this

PluginContext

err?

Error

Returns

void


buildStart()

  • Type: buildStart: (this, options) => void
Defined in: plugin/index.ts:126

Parameters

this

PluginContext

options

NormalizedInputOptions

Returns

void


closeBundle()

  • Type: closeBundle: (this, error?) => void
Defined in: plugin/index.ts:204

Parameters

this

PluginContext

error?

Error

Returns

void


closeWatcher()

  • Type: closeWatcher: (this) => void
Defined in: plugin/index.ts:213

Parameters

this

PluginContext

Returns

void


generateBundle()

  • Type: generateBundle: (this, outputOptions, bundle, isWrite) => void
Defined in: plugin/index.ts:191

Parameters

this

PluginContext

outputOptions

NormalizedOutputOptions

bundle

OutputBundle

isWrite

boolean

Returns

void


load()

  • Type: load: (this, id) => MaybePromise<LoadResult>
Defined in: plugin/index.ts:145

Parameters

this

PluginContext

id

string

Returns

MaybePromise<LoadResult>


moduleParsed()

  • Type: moduleParsed: (this, moduleInfo) => void
Defined in: plugin/index.ts:158

Parameters

this

PluginContext

moduleInfo

ModuleInfo

Returns

void


onLog()

  • Type: onLog: (this, level, log) => boolean | NullValue
Defined in: plugin/index.ts:107

Parameters

this

MinimalPluginContext

level

"info" | "debug" | "warn"

log

RollupLog

Returns

boolean | NullValue


options()

Defined in: plugin/index.ts:113

Parameters

this

MinimalPluginContext

options

InputOptions

Returns

NullValue | InputOptions


outputOptions()

  • Type: outputOptions: (this, options) => NullValue | OutputOptions
Defined in: plugin/index.ts:119

Parameters

this

MinimalPluginContext

options

OutputOptions

Returns

NullValue | OutputOptions


renderChunk()

  • Type: renderChunk: (this, code, chunk, outputOptions, meta) => string | NullValue | { code: string; map?: SourceMapInput | undefined; }
Defined in: plugin/index.ts:170

Parameters

this

PluginContext

code

string

chunk

RenderedChunk

outputOptions

NormalizedOutputOptions

meta

RenderedChunkMeta

Returns

string | NullValue | { code: string; map?: SourceMapInput | undefined; }


renderError()

  • Type: renderError: (this, error) => void
Defined in: plugin/index.ts:189

Parameters

this

PluginContext

error

Error

Returns

void


renderStart()

  • Type: renderStart: (this, outputOptions, inputOptions) => void
Defined in: plugin/index.ts:164

Parameters

this

PluginContext

outputOptions

NormalizedOutputOptions

inputOptions

NormalizedInputOptions

Returns

void


resolveDynamicImport()

Defined in: plugin/index.ts:139

Parameters

this

PluginContext

source

string

importer

string | undefined

Returns

ResolveIdResult

Deprecated

This hook is only for rollup plugin compatibility. Please use resolveId instead.


resolveId()

Defined in: plugin/index.ts:128

Parameters

this

PluginContext

source

string

importer

string | undefined

extraOptions

ResolveIdExtraOptions

Returns

ResolveIdResult


transform()

Defined in: plugin/index.ts:147

Parameters

this

TransformPluginContext

code

string

id

string

meta

BindingTransformHookExtraArgs & object

Returns

TransformResult


watchChange()

  • Type: watchChange: (this, id, event) => void
Defined in: plugin/index.ts:207

Parameters

this

PluginContext

id

string

event
event

ChangeEvent

Returns

void


writeBundle()

  • Type: writeBundle: (this, outputOptions, bundle) => void
Defined in: plugin/index.ts:198

Parameters

this

PluginContext

outputOptions

NormalizedOutputOptions

bundle

OutputBundle

Returns

void

Released under the MIT License.