graphieros / vue-data-ui

An open source user-empowering data visualization Vue 3 components library for eloquent data storytelling
https://vue-data-ui.graphieros.com/
MIT License
1.08k stars 50 forks source link

If I don't use pdf and screenshots, can you not package jsPDF and html2canvas? #116

Closed ae86yyk closed 2 weeks ago

ae86yyk commented 2 weeks ago

If I don't use pdf and screenshots, can you not package jsPDF and html2canvas? Reduced packing volume.

graphieros commented 2 weeks ago

Not really. What I can do is make sure html2canvas and JsPdf are not downloaded by the end user if printing is not used.

graphieros commented 2 weeks ago

v2.3.90 is a partial answer to your issue.

html2canvas and JsPdf will be downloaded by the client only if the print functionalities are used. Therefore, setting config.userOptions.buttons.pdf and config.userOptions.buttons.img to false will hide PDF and IMG buttons in the menu, preventing these functionalities to be used, and the packages to be shipped.

I understand it is not exactly what you expected with your issue, but the js chunks shipped to the end user will be smaller, which is more important than the package size. This will do for now.