Skip to main content

Built and signed on GitHub Actions

vite 插件,用于压缩 png 格式的图片

This package works with Node.js, DenoIt is unknown whether this package works with Cloudflare Workers
It is unknown whether this package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
JSR Score
94%
Published
4 weeks ago (1.0.3)

介绍

这是一款 vite 插件,用于压缩 png 格式的图片。 采用pngquant 软件进行压缩。当前插件的功能是对构建产物下的所有 png 格式的图片 进行压缩,压缩质量为80。

命名规则

  • 文件名采用下划线规则

Examples

Example 1

Built and signed on
GitHub Actions
View transparency log

Add Package

deno add jsr:@vite-plugin/compress-png

Import symbol

import * as mod from "@vite-plugin/compress-png";

---- OR ----

Import directly with a jsr specifier

import * as mod from "jsr:@vite-plugin/compress-png";

Add Package

npx jsr add @vite-plugin/compress-png

Import symbol

import * as mod from "@vite-plugin/compress-png";

Add Package

yarn dlx jsr add @vite-plugin/compress-png

Import symbol

import * as mod from "@vite-plugin/compress-png";

Add Package

pnpm dlx jsr add @vite-plugin/compress-png

Import symbol

import * as mod from "@vite-plugin/compress-png";