Search Docs
HtmlType
export interface HtmlType extends HtmlRspackPluginOptions { /** * The index.html file path based on project root * @default src/index.html */ template?: string /** * The favicon file path based on project root * @default src/favicon.ico */ favicon?: string /** * Website language */ lang?: string /** * External files injected into html (breakchange in v3.1.4) */ tags?: { type: "js" | "css"; src?: string; content?: string; pos?: "head" | "body"; }[] }
Since version 3.1.4, files and tags have been unified into tags?: InjectHeadTagsTypeItem[] configuration
files
tags
tags?: InjectHeadTagsTypeItem[]
import {defineConfig} from '@empjs/cli' export default defineConfig(store => { return { html: { template: 'src/index.html', }, } })
export interface HtmlType extends HtmlRspackPluginOptions { files?: { /** * Insert CSS files */ css?: string[] /** * Insert JavaScript files */ js?: string[] }, /** * Custom head/body tags (requires template configuration) */ tags?: { headTags?: any[] bodyTags?: any[] } }