Skip to main content

Migration to v4

With v4, this library introduces a few small but breaking changes, so migration from v3 should be deadly easy.

New exports​

Default export was renamed to Canvg

v3
import Canvg, { presets } from 'canvg';
v4
import { Canvg, presets } from 'canvg';

TypeScript 4​

Starting from canvg v4, you should use TypeScript 4.