Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@cf-wasm/resvg

fineshopdesign10.1kMPL-2.00.1.24TypeScript support: included

A high-performance SVG renderer and toolkit, powered by Rust based resvg.

resvg, svg, resvg-js, resvg-wasm, rust, svg2png, svg2img, svg to png, wasm, cloudflare-workers

readme

@cf-wasm/resvg

A high-performance SVG renderer and toolkit, powered by Rust based resvg.

Powered by @resvg/resvg-wasm.

Installation

npm install @cf-wasm/resvg       # npm
yarn add @cf-wasm/resvg          # yarn
pnpm add @cf-wasm/resvg          # pnpm

Usage

  • Cloudflare Workers / Pages (Esbuild):

    import { Resvg } from "@cf-wasm/resvg";
  • Next.js Edge Runtime (Webpack):

    import { Resvg } from "@cf-wasm/resvg/next";
  • Node.js (file base):

    import { Resvg } from "@cf-wasm/resvg/node";

Documentation

Read official documentation at @resvg/resvg-wasm.