Interface: TemplateHooks
To allow other plugins to alter the Template, this plugin executes tapable hooks.
Example
Properties
afterEmit
afterEmit:
AsyncSeriesWaterfallHook<{outputName:string; }>
Alpha
Called after the template is emitted.
asyncChunkName
asyncChunkName:
SyncWaterfallHook<string>
Alpha
Get the real name of an async chunk. The files with the same asyncChunkName will be placed in the same template.
beforeEmit
beforeEmit:
AsyncSeriesWaterfallHook<{chunkGroups:ChunkGroup[];cssChunks:Asset[];cssDiagnostics?:string;debugInfo:string;finalEncodeOptions:EncodeOptions;mainThreadAssets:Asset[];outputName:string;template:Buffer; }>
Alpha
Called before the template is emitted. Can be used to modify the template.
beforeEncode
beforeEncode:
AsyncSeriesWaterfallHook<{chunkGroups:ChunkGroup[];encodeData:EncodeRawData;filenameTemplate:string;intermediate:string;intermediateAssets:string[]; }>
Alpha
Called before the encode process. Can be used to modify the encode options.
encode
encode:
AsyncSeriesBailHook<{encodeOptions:EncodeOptions;intermediate?:string; }, {buffer:Buffer;cssDiagnostics?:string;debugInfo:string; }>
Alpha
Call the encode process.