Skip to main content
Home

Built and signed on GitHub Actions

Works with
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 Score94%
Publisheda year ago (1.0.3)

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

介绍

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

命名规则

  • 文件名采用下划线规则

Examples

Example 1

Built and signed on
GitHub Actions

Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

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

Import symbol

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

Import directly with a jsr specifier

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

Add Package

pnpm i jsr:@vite-plugin/compress-png
or (using pnpm 10.8 or older)
pnpm dlx jsr add @vite-plugin/compress-png

Import symbol

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

Add Package

yarn add jsr:@vite-plugin/compress-png
or (using Yarn 4.8 or older)
yarn dlx jsr add @vite-plugin/compress-png

Import symbol

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

Add Package

vlt install jsr:@vite-plugin/compress-png

Import symbol

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

Add Package

npx jsr add @vite-plugin/compress-png

Import symbol

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