You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
When one tries to use react-pdf on Cloudflare Pages (for example in a NextJS project), generating PDFs fail with "Wasm code generation disallowed by embedder" due to security restrictions. This issue arises from yoga-layout loading a wasm script. yoga-layout is imported by @react-pdf/layout.
Describe the solution you'd like
It would be nice, if one could specify which yoga-layout version @react-pdf/layout shall load. When manually patching @react-pdf/layout to load yoga-layout/asmjs-sync instead of just yoga-layout, the above issue can be circumvented.
Describe alternatives you've considered
In case the above is out of scope, I at least wanted to write it down such that others having this issue can find a solution.
Additional context
For reference, the patch I did:
(same for the cjs version)
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
When one tries to use react-pdf on Cloudflare Pages (for example in a NextJS project), generating PDFs fail with "Wasm code generation disallowed by embedder" due to security restrictions. This issue arises from yoga-layout loading a wasm script. yoga-layout is imported by @react-pdf/layout.
Describe the solution you'd like
It would be nice, if one could specify which yoga-layout version @react-pdf/layout shall load. When manually patching @react-pdf/layout to load
yoga-layout/asmjs-sync
instead of justyoga-layout
, the above issue can be circumvented.Describe alternatives you've considered
In case the above is out of scope, I at least wanted to write it down such that others having this issue can find a solution.
Additional context
For reference, the patch I did:
(same for the cjs version)
The text was updated successfully, but these errors were encountered: