interface FunctionPluginHooks {
    augmentChunkHash: ((this, chunk) => string | void);
    buildEnd: ((this, error?) => void);
    buildStart: ((this, options) => void);
    closeBundle: ((this) => void);
    closeWatcher: ((this) => void);
    generateBundle: ((this, options, bundle, isWrite) => void);
    load: LoadHook;
    moduleParsed: ModuleParsedHook;
    onLog: ((this, level, log) => boolean | NullValue);
    options: ((this, options) => InputOptions | NullValue);
    outputOptions: ((this, options) => NullValue | OutputOptions);
    renderChunk: RenderChunkHook;
    renderDynamicImport: ((this, options) => NullValue | {
        left: string;
        right: string;
    });
    renderError: ((this, error?) => void);
    renderStart: ((this, outputOptions, inputOptions) => void);
    resolveDynamicImport: ResolveDynamicImportHook;
    resolveFileUrl: ResolveFileUrlHook;
    resolveId: ResolveIdHook;
    resolveImportMeta: ResolveImportMetaHook;
    shouldTransformCachedModule: ShouldTransformCachedModuleHook;
    transform: TransformHook;
    watchChange: WatchChangeHook;
    writeBundle: ((this, options, bundle) => void);
}

Properties

augmentChunkHash: ((this, chunk) => string | void)

Type declaration

    • (this, chunk): string | void
    • Parameters

      Returns string | void

buildEnd: ((this, error?) => void)

Type declaration

buildStart: ((this, options) => void)

Type declaration

closeBundle: ((this) => void)

Type declaration

closeWatcher: ((this) => void)

Type declaration

generateBundle: ((this, options, bundle, isWrite) => void)

Type declaration

load: LoadHook
moduleParsed: ModuleParsedHook
onLog: ((this, level, log) => boolean | NullValue)

Type declaration

options: ((this, options) => InputOptions | NullValue)

Type declaration

outputOptions: ((this, options) => NullValue | OutputOptions)

Type declaration

renderChunk: RenderChunkHook
renderDynamicImport: ((this, options) => NullValue | {
    left: string;
    right: string;
})

Type declaration

    • (this, options): NullValue | {
          left: string;
          right: string;
      }
    • Parameters

      • this: PluginContext
      • options: {
            customResolution: null | string;
            format: InternalModuleFormat;
            moduleId: string;
            targetModuleId: null | string;
        }
        • customResolution: null | string
        • format: InternalModuleFormat
        • moduleId: string
        • targetModuleId: null | string

      Returns NullValue | {
          left: string;
          right: string;
      }

renderError: ((this, error?) => void)

Type declaration

renderStart: ((this, outputOptions, inputOptions) => void)

Type declaration

resolveDynamicImport: ResolveDynamicImportHook
resolveFileUrl: ResolveFileUrlHook
resolveId: ResolveIdHook
resolveImportMeta: ResolveImportMetaHook
shouldTransformCachedModule: ShouldTransformCachedModuleHook
transform: TransformHook
watchChange: WatchChangeHook
writeBundle: ((this, options, bundle) => void)

Type declaration