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

Chunk size big #36

Closed
rxw1 opened this issue Jul 19, 2023 · 1 comment
Closed

Chunk size big #36

rxw1 opened this issue Jul 19, 2023 · 1 comment

Comments

@rxw1
Copy link
Contributor

rxw1 commented Jul 19, 2023

Hello,

when building my thing using Vite I see a quite large chunk size for VuePDF. I've already isolated it into a separate chunk to see more clearly what's going on, but apart from that, I'm quite clueless as to why it's at almost 3 MB.

image

Do you have any ideas? Is that normal? Even with pdf.js as a dependency, it shouldn't be that big, I guess.

Best regards

@TaTo30
Copy link
Owner

TaTo30 commented Jul 19, 2023

That size is because VuePDF embed pdf.worker.js in final bundle, that way isn't necessary to configure the worker in external projects.

But i've checked and noticed that there are a minified version of pdf.worker that reduce the size by 55%, isn't much but is better.

This bundle is with base pdf.worker
imagen

...and this bundle is with minified pdf.worker
imagen

@TaTo30 TaTo30 closed this as completed Jul 25, 2023
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

No branches or pull requests

2 participants