Bundle size is critical for both web browsers as well as serverless functions. Unfortunately using just a few basic functions already adds 1,18 mb (299 kb gzipped).
It would be great if bundle size would be reduced. One way to do so would be to allow tree shaking instead of importing everthing, e.g.:
import { PDFDocument, registerFont, image, fontSize } from 'pdfkit';
const doc = new PDFDocument(options);
doc.pipe(registerFont('...'), image('...'), fontSize(9))
Possibly related: #1367
Bundle size is critical for both web browsers as well as serverless functions. Unfortunately using just a few basic functions already adds
1,18 mb (299 kb gzipped).It would be great if bundle size would be reduced. One way to do so would be to allow tree shaking instead of importing everthing, e.g.:
Possibly related: #1367