@farmfe/core
Version:
Farm is a extremely fast web build tool written in Rust. Farm can start a project in milliseconds and perform HMR within 10ms, making it much faster than similar tools like webpack and vite.
18 lines (17 loc) • 624 B
TypeScript
/**
* @license MIT Copyright (c) 2019-present, Yuxi (Evan) You and Vite contributors.
* This file is the same as https://github.com/vitejs/vite/blob/main/packages/vite/src/node/plugins/html.ts#L1185
*/
export interface HtmlTagDescriptor {
tag: string;
attrs?: Record<string, string | boolean | undefined>;
children?: string | HtmlTagDescriptor[];
/**
* default: 'head-prepend'
*/
injectTo?: 'head' | 'body' | 'head-prepend' | 'body-prepend';
}
export declare function applyHtmlTransform(html: string, res: HtmlTagDescriptor[] | {
html: string;
tags: HtmlTagDescriptor[];
}): string;