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

Document pdfjs-dist/webpack #10940

Closed
maclockard opened this issue Jul 2, 2019 · 4 comments · Fixed by #11081
Closed

Document pdfjs-dist/webpack #10940

maclockard opened this issue Jul 2, 2019 · 4 comments · Fixed by #11081
Labels

Comments

@maclockard
Copy link

The current webpack example makes no mention of this as an option or how to correctly use it with worker loader. Instead, I only found it by looking at this comment: #7612 (comment)

@dhuang612
Copy link
Contributor

dhuang612 commented Aug 15, 2019

I would like to take a look at this, it's my first time trying to contribute to an open source project.
So from what I understand, to make this contribution. I would download the project add in the information from the comment and make a PR back up to you guys for review?

@timvandermeij
Copy link
Contributor

Exactly. I think a solution for this would be to extend https://github.com/mozilla/pdf.js/blob/master/examples/webpack/README.md with information about pdfjs-dist/webpack.

@mcorteel-harel
Copy link

Just to clarify, what I get from this is that if you are using webpack, you should import PDF.js this way:

import * as pdfjsLib from 'pdfjs-dist/webpack';

instead of

import * as pdfjsLib from 'pdfjs-dist';

I was half-considering not coming back to my job and changing my name before I stumbled on this! Almost lost a full day of work on this...

@erkebek
Copy link

erkebek commented Sep 19, 2023

Would be great to have documentation also on how to use built-in viewer with Webpack.

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

Successfully merging a pull request may close this issue.

5 participants