Make pdfjs as peerDependencies
Currently the build ouputdist/index.mjs and dist/index.umd.js is about 1.4M.
The reason for the big size seems to be pdfjs is bundled, as base64 encoded string.
Total size of index.mjs: 1474199 Size of encoded string: 1449652
Seems like it's mostly taken by pdfjs.
Pdfjs itself is not that big, base64 encoding will increase the size.
It would be really awesome if we could easily point to the latest version of pdfjs-dist as well. Render performance on the latest release seems to be a lot better
It's the pdfjs worker the one being bundled, this was made like this so the package can be used by just installing it without much configuration.
It would be really awesome if we could easily point to the latest version of pdfjs-dist as well. Render performance on the latest release seems to be a lot better
pdfjs version need to be locked to avoid issue #142, this is shame because the package need to be updated manually but let me release a new version soon :)
Ah, makes sense. And thank you for your work!
pdfjs version need to be locked to avoid issue #142
Is this still the case? How may we optimize bundle size? I would love to use vue-pdf, looks amazing! But we cant have +1 mb just for pdf.js
Is this still the case?
Yes, It is.
I am thinking on publish a "light" version that does not embed the worker and make it importable using something like import .. from "@tato30/vue-pdf/light" It will require some changes on the repo structure but the final bundle size are 34kb so maybe It worths.
But we cant have +1 mb just for pdf.js
Sure that is a issue but have you considered that you still need to include pdf.js in the final bundle? even if you include it in the /public folder you still will get 1mb