import type { MetaOptions } from '../../generateMetaTags'; import type { ArrayOrNot, ChainedConfig } from '../utils'; export type CrossOrigin = 'anonymous' | 'use-credentials'; export type ScriptInject = boolean | 'body' | 'head'; export type ScriptLoading = 'defer' | 'module' | 'blocking'; export interface HtmlInjectTag { tag: string; attrs?: Record; children?: string; hash?: boolean | string | ((url: string, hash: string) => string); publicPath?: boolean | string | ((url: string, publicPath: string) => string); append?: boolean; head?: boolean; } export type HtmlInjectTagUtils = { outputName: string; publicPath: string; hash: string; }; export type HtmlInjectTagHandler = (tags: HtmlInjectTag[], utils: HtmlInjectTagUtils) => HtmlInjectTag[] | void; export type HtmlInjectTagDescriptor = HtmlInjectTag | HtmlInjectTagHandler; export interface SharedHtmlConfig { /** * Configure the `` tag of the HTML. */ meta?: MetaOptions; /** * Set different meta tags for different pages. * The usage is same as `meta`, and you can use the "entry name" as the key to set each page individually. * `metaByEntries` will overrides the value set in `meta`. */ metaByEntries?: Record; /** * Set the title tag of the HTML page. */ title?: string; /** * Set different title for different pages. * The usage is same as `title`, and you can use the "entry name" as the key to set each page individually. * `titleByEntries` will overrides the value set in `title`. */ titleByEntries?: Record; /** * Set the inject position of the `