feat: add archive plug-in to output dist.zip after build (#4272)

* feat: add the archiver plug-in to output dist.zip after build

* chore: update env
This commit is contained in:
Vben
2024-08-29 21:47:00 +08:00
committed by GitHub
parent be3bcc1122
commit 98da0672e7
21 changed files with 200 additions and 44 deletions

View File

@@ -33,6 +33,19 @@ interface NitroMockPluginOptions {
verbose?: boolean;
}
interface ArchiverPluginOptions {
/**
* 输出文件名
* @default dist
*/
name?: string;
/**
* 输出目录
* @default .
*/
outputDir?: string;
}
/**
* importmap 插件配置
*/
@@ -74,6 +87,10 @@ interface CommonPluginOptions {
}
interface ApplicationPluginOptions extends CommonPluginOptions {
/** 开启后会在打包dist同级生成dist.zip */
archiver?: boolean;
/** 压缩归档插件配置 */
archiverPluginOptions?: ArchiverPluginOptions;
/** 开启 gzip|brotli 压缩 */
compress?: boolean;
/** 压缩类型 */
@@ -134,6 +151,7 @@ type DefineConfig = DefineApplicationOptions | DefineLibraryOptions;
export type {
ApplicationPluginOptions,
ArchiverPluginOptions,
CommonPluginOptions,
ConditionPlugin,
DefineApplicationOptions,