chore: remove vite-plugin-html

This commit is contained in:
xingyu4j
2026-04-10 22:00:33 +08:00
committed by allen
parent bd369df3bc
commit 093479bb33
6 changed files with 46 additions and 146 deletions

View File

@@ -6,6 +6,7 @@ import type {
UserConfig,
UserConfigFnPromise,
} from 'vite';
import type { Options as HtmlMinifierOptions } from 'html-minifier-terser';
import type { Options as PwaPluginOptions } from 'vite-plugin-pwa';
/**
@@ -94,6 +95,12 @@ interface ArchiverPluginOptions {
outputDir?: string;
}
/**
* HTML 插件配置
* @description 用于配置基于 transformIndexHtml 的 HTML 压缩行为
*/
type HtmlPluginOptions = HtmlMinifierOptions;
/**
* ImportMap 插件配置
* @description 用于配置模块的 CDN 导入
@@ -217,7 +224,7 @@ interface ApplicationPluginOptions extends CommonPluginOptions {
* 是否开启 HTML 插件
* @default true
*/
html?: boolean;
html?: boolean | HtmlPluginOptions;
/**
* 是否开启国际化
* @default false
@@ -342,6 +349,7 @@ export type {
DefineApplicationOptions,
DefineConfig,
DefineLibraryOptions,
HtmlPluginOptions,
IImportMap,
ImportmapPluginOptions,
LibraryPluginOptions,