Home > @lynx-js/template-webpack-plugin > TemplateHooks
To allow other plugins to alter the Template, this plugin executes tapable hooks.
Signature:
Property | Modifiers | Type | Description |
---|---|---|---|
afterEmit | AsyncSeriesWaterfallHook<{ outputName: string; }> | (ALPHA) Called after the template is emitted. | |
asyncChunkName | SyncWaterfallHook<string | undefined | null> | (ALPHA) Get the real name of an async chunk. The files with the same asyncChunkName will be placed in the same template. | |
beforeEmit | AsyncSeriesWaterfallHook<{ finalEncodeOptions: EncodeOptions; debugInfo: string; template: Buffer; outputName: string; mainThreadAssets: Asset[]; }> | (ALPHA) Called before the template is emitted. Can be used to modify the template. | |
beforeEncode | AsyncSeriesWaterfallHook<{ encodeData: EncodeRawData; filenameTemplate: string; entryNames: string[]; }> | (ALPHA) Called before the encode process. Can be used to modify the encode options. | |
encode | AsyncSeriesBailHook<{ encodeOptions: EncodeOptions; intermediate: string; }, { buffer: Buffer; debugInfo: string; }> | (ALPHA) Call the encode process. |