Skip to content

fix(pdfkit): declare pako browser dependency#3453

Open
afonsojramos wants to merge 1 commit into
diegomura:masterfrom
afonsojramos:fix/pdfkit-declare-pako-dependency
Open

fix(pdfkit): declare pako browser dependency#3453
afonsojramos wants to merge 1 commit into
diegomura:masterfrom
afonsojramos:fix/pdfkit-declare-pako-dependency

Conversation

@afonsojramos

Copy link
Copy Markdown

Problem

The PDFKit browser build deliberately externalizes imports such as pako/lib/zlib/zstream.js, but @react-pdf/pdfkit does not declare pako as a runtime dependency. Strict package layouts therefore keep pako nested under browserify-zlib, and consumers fail to bundle the browser entry because the direct import cannot resolve.

This reproduces with Vite 8/Rolldown under an isolated global-store layout.

Fix

Declare pako@^1.0.11 in packages/pdfkit/package.json and add a patch changeset.

Validation

  • corepack yarn workspace @react-pdf/pdfkit build
  • Prettier check for the changed package and changeset
  • Both lib/pdfkit.js and lib/pdfkit.browser.js build successfully

@changeset-bot

changeset-bot Bot commented Jul 16, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 9a2f43f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 12 packages
Name Type
@react-pdf/pdfkit Patch
@react-pdf/font Patch
@react-pdf/renderer Patch
@react-pdf/types Patch
@react-pdf/math Patch
@react-pdf/mermaid Patch
next-14 Patch
next-15 Patch
@react-pdf/vite-example Patch
@react-pdf/layout Patch
@react-pdf/render Patch
@react-pdf/stylesheet Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant