import type { TemplateOptions } from '@hyperse/html-webpack-plugin-loader'; import { type HtmlPluginConfigTokenType } from '../helpers/get-html-plugin-config.js'; export declare type EvolveMultiCdnEnvType = 'me' | 'dev' | 'uat' | 'inte' | 'inte2' | 'inte3' | 'inte4' | 'rc' | 'prod' | 'ntv'; export type EvolveMultiCDNConfig = { [key in EvolveMultiCdnEnvType]?: string[]; }; /** * Allow us customized to resolve current runtime environment. */ export type EvolveMultiCDNEnvResolver = (url: string) => EvolveMultiCdnEnvType | undefined; /** * The html plugin configuration for each entry item */ export type MultiHtmlCDNEntryItem = { /** * webpack relative or absolute path to the template. * It must be an absolute path. `path.join(__dirname, `templates/index-{0}.html`)` * @default join(evolveRoot, `/templates/html-plugin/index-{0}.html`) */ templatePath?: string; /** * Indicates if we need to minify html. * @default true */ htmlMinify?: boolean; /** * Support inject viewport scripts in each modules * It only available while `allowPx2rem` = true * * This script will be injected into headInlineScripts of the html file, position is 'beginning'. * @default '' */ viewport?: string; /** * The title to use for the generated HTML document * @default '' */ title?: string; /** * The favicon url to use for the generated HTML document * Should be an path of (32 x 32).png */ favicon?: HtmlPluginConfigTokenType; /** * Allow us customized head meta tags into compiled html template. * @default [] */ headMetaTags?: HtmlPluginConfigTokenType; /** * The head styles of the page * @default [] */ headStyles?: HtmlPluginConfigTokenType; /** * The head scripts of the page * @default [] */ headScripts?: HtmlPluginConfigTokenType; /** * The body scripts of the page * @default [] */ bodyScripts?: HtmlPluginConfigTokenType; /** * The head inline scripts of the page * @default [] */ headInlineScripts?: HtmlPluginConfigTokenType; /** * The head inline styles of the page * @default [] */ headInlineStyles?: HtmlPluginConfigTokenType; /** * Give `env` list to exclude from `multi-cdn` plugin. * Normally for `me`, `dev`,`uat`, `ntv` env we should use relative assets path instead cdn. * @default ['dev', 'ntv'] */ excludeCdnEnvs?: EvolveMultiCdnEnvType[]; };