For AI agents: the complete documentation index is available at /zh/llms.txt, the full documentation bundle is available at /zh/llms-full.txt, and this page is available as Markdown at /zh/api/template-webpack-plugin.templatehooks.beforeencode.md.
这是开发预览网站。请访问正式文档 lynxjs.org

Home > @lynx-js/template-webpack-plugin > TemplateHooks > beforeEncode

TemplateHooks.beforeEncode property

This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Called before the encode process. Can be used to modify the encode options.

Signature:

beforeEncode: AsyncSeriesWaterfallHook<{
        encodeData: EncodeRawData;
        filenameTemplate: string;
        chunkGroups: ChunkGroup[];
        intermediate: string;
        intermediateAssets: string[];
    }>;