Skip to content

yuan66-hub/unplugin-compress-svga

Repository files navigation

✨ unplugin-compress-svga

📦 Install

npm add @yuanjianming/unplugin-compress-svga -D

💪 Basic Use

  • vite.config.ts
import { defineConfig } from 'vite'
import compressSvga from '@yuanjianming/unplugin-compress-svga/vite'
export default defineConfig({
    //....
    plugins: [compressSvga({
      //   https://sharp.pixelplumbing.com/api-output#png
    })],
})

💪 Default Config

  //   https://sharp.pixelplumbing.com/api-output#png
{
            quality: 70,
            palette: true,       
}