@vite-plugin/compress-png@1.0.3Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
Built and signed on GitHub Actions
Works with
•JSR Score94%•This package works with Node.js, DenoIt is unknown whether this package works with Cloudflare Workers


Publisheda year ago (1.0.3)
vite 插件,用于压缩 png 格式的图片
import { glob } from "npm:glob@^10.4.2"; /** * 从目标目录中过滤出待压缩的 png 文件 * * @param dir 目标目录 * @param pattern glob pattern * * @returns 待压缩的 png 文件数组 */ export async function filter(dir: string, pattern: string | string[]) { const compressedImages = await glob(pattern, { cwd: dir, absolute: true, }); return compressedImages; }