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

Is it possible to reduce size of production code? This library takes about 1.5 MB when compiled, and the module using it is only 200kb. #146

Closed
jackli199311 opened this issue Aug 24, 2017 · 3 comments
Assignees
Milestone

Comments

@jackli199311
Copy link

In my project I'm using lazy loading with AOT. The compiled chunk of code that contains ng2-pdf-viewer is about 1.8MB, and if I take out the library it's only around 200kb. Is there a way to reduce the size of the compiled code? I do notice inside pdfjs-dist, there is a pdf.combined.js(1.6MB) and a pdf.min.js(219kb). How are they different? Can the use of pdf.min.js reduce the compiled size of this library? Any help will be greatly appreciated. Thanks!

@VadimDez VadimDez self-assigned this Sep 1, 2017
@VadimDez VadimDez added this to the 1.2.3 milestone Sep 1, 2017
VadimDez added a commit that referenced this issue Sep 1, 2017
Closes #146, load web worker separately and use minified version of pdfjs
@VadimDez
Copy link
Owner

VadimDez commented Sep 1, 2017

released under version 1.2.3

@tomaskunder
Copy link

Hi, I've got this error on my project when using the current version, seems related to the min version of pdf.js
Uncaught ReferenceError: Invalid left-hand side in assignment

@VadimDez
Copy link
Owner

VadimDez commented Sep 4, 2017

@tomaskunder see #150

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants