npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

vite-plugin-zip-zwf

v1.1.7

Published

vite项目压缩插件

Readme

vite-plugin-zip-zwf

用于vite的压缩插件,打包后自动压缩

安装

npm i -D vite-plugin-zip-zwf

注意事项

package.json需要设置如下内容

"type": "module",

使用

import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import zip from 'vite-plugin-zip-zwf'

export default defineConfig({
  plugins: [vue(), zip()],
})

参数

/**
 * 插件配置选项接口
 * 定义 Vite 打包后压缩插件可配置的所有参数
 */
export interface Options {
    /**
   * 是否开启插件
   * 控制插件是否启用,默认为 true
   * 如果设置为 false,则插件不会执行任何操作
   * @default true
   */
  enable?: boolean;
    /**
     * 输入目录路径
     * 指定需要打包压缩的源文件夹
     * @default `dist`
     */
    inDir?: string;
    /**
     * 输出目录路径
     * 指定压缩包文件的保存位置
     * @default `dist`
     */
    outDir?: string;
    /**
     * 压缩包文件名
     * 指定生成的压缩包文件名称
     * @default `dist.zip`
     */
    outFileName?: string;
    /**
     * 是否启用日志输出
     * 控制插件运行时的日志信息显示
     * @default true
     */
    enableLogging?: boolean;
    /**
     * 是否开启版本号
     * @default true
     */
    enableVersion?: boolean;
      /** 是否压缩inDir目录
   * 如果设置为 true,则会将 inDir 目录整个压缩,
   * 如果设置为 false,只压缩inDir 目录下的所有文件
   * @default true
  */
  isInclude?: boolean;
  
  }
  

参数使用案例

假设今天日期为2050-01-01 以下配置将会在zip-folder文件夹下创建名称为2025-01-0的1目录,目录下会有会有

pc_2050-01-01_V1.zip的压缩包,如果不开启enableVersion将不会有版本号;

import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import zip from 'vite-plugin-zip-zwf'

export default defineConfig({
  plugins: [vue(), zip(
  {
      inDir:"dist",
      outDir:"zip-folder",
      outFileName:"pc",
      enableLogging:true,
      enableVersion:true,
  })],
})