mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-24 14:29:19 +08:00
update: 升级vben5.5.9到5.7.0
This commit is contained in:
@@ -1,6 +1,12 @@
|
||||
import type { Options as HtmlMinifierOptions } from 'html-minifier-terser';
|
||||
import type { PluginVisualizerOptions } from 'rollup-plugin-visualizer';
|
||||
import type { ConfigEnv, PluginOption, UserConfig } from 'vite';
|
||||
import type { PluginOptions } from 'vite-plugin-dts';
|
||||
import type { PluginOptions } from 'unplugin-dts';
|
||||
import type {
|
||||
ConfigEnv,
|
||||
PluginOption,
|
||||
UserConfig,
|
||||
UserConfigFnPromise,
|
||||
} from 'vite';
|
||||
import type { Options as PwaPluginOptions } from 'vite-plugin-pwa';
|
||||
|
||||
/**
|
||||
@@ -89,6 +95,12 @@ interface ArchiverPluginOptions {
|
||||
outputDir?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* HTML 插件配置
|
||||
* @description 用于配置基于 transformIndexHtml 的 HTML 压缩行为
|
||||
*/
|
||||
type HtmlPluginOptions = HtmlMinifierOptions;
|
||||
|
||||
/**
|
||||
* ImportMap 插件配置
|
||||
* @description 用于配置模块的 CDN 导入
|
||||
@@ -202,6 +214,11 @@ interface ApplicationPluginOptions extends CommonPluginOptions {
|
||||
* @description 可选的压缩类型
|
||||
*/
|
||||
compressTypes?: ('brotli' | 'gzip')[];
|
||||
/**
|
||||
* 是否开启 dayjs 插件
|
||||
* @default true
|
||||
*/
|
||||
dayjs?: boolean;
|
||||
/**
|
||||
* 是否抽离配置文件
|
||||
* @default false
|
||||
@@ -212,7 +229,7 @@ interface ApplicationPluginOptions extends CommonPluginOptions {
|
||||
* 是否开启 HTML 插件
|
||||
* @default true
|
||||
*/
|
||||
html?: boolean;
|
||||
html?: boolean | HtmlPluginOptions;
|
||||
/**
|
||||
* 是否开启国际化
|
||||
* @default false
|
||||
@@ -327,6 +344,8 @@ type DefineLibraryOptions = (config?: ConfigEnv) => Promise<{
|
||||
*/
|
||||
type DefineConfig = DefineApplicationOptions | DefineLibraryOptions;
|
||||
|
||||
type VbenViteConfig = Promise<UserConfig> | UserConfig | UserConfigFnPromise;
|
||||
|
||||
export type {
|
||||
ApplicationPluginOptions,
|
||||
ArchiverPluginOptions,
|
||||
@@ -335,9 +354,11 @@ export type {
|
||||
DefineApplicationOptions,
|
||||
DefineConfig,
|
||||
DefineLibraryOptions,
|
||||
HtmlPluginOptions,
|
||||
IImportMap,
|
||||
ImportmapPluginOptions,
|
||||
LibraryPluginOptions,
|
||||
NitroMockPluginOptions,
|
||||
PrintPluginOptions,
|
||||
VbenViteConfig,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user