Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: encode unicode trie as base64 #1839

Merged
merged 1 commit into from
May 30, 2022

Conversation

diegomura
Copy link
Owner

Encodes trie data as base64 instead of raw buffer to reduce package size. Based on some quick estimations this reduces @react-pdf/unicode-properties size by half (from ~40kb to ~20kb). It's not much but every kb counts to reduce the lib overall bundle size

@diegomura diegomura merged commit 434df31 into master May 30, 2022
@diegomura diegomura deleted the dm/unicode-properties-encoding branch May 30, 2022 05:53
carlobeltrame added a commit to carlobeltrame/vite-plugin-shim-react-pdf that referenced this pull request Jun 21, 2022
diegomura/react-pdf#1839
This starts occurring for @react-pdf/renderer >= 2.1.2, but the workaround should not hurt older versions either
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