-
-
Notifications
You must be signed in to change notification settings - Fork 908
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
Replace pdfjs-dist build with legacy ES5 version #794
Conversation
What is the issue we're trying to solve here? Does it crash on any of the supported browsers? Please raise an issue first so we can reproduce and discuss. |
Sorry, I have not found the browser list react-pdf supports. According to the document, I can know IE is not supported in v5.
This causes the projects which use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@njleonzhang Have you been able to create an issue and link it to this PR?
@mrbaguvix why we need a issue, it's the process for pr merging? |
pnpm-lock.yaml
Outdated
@@ -0,0 +1,6336 @@ | |||
lockfileVersion: 5.3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done @wojtekmaj
Any idea when it could be release? |
any plan to merge and release? |
As of pdfjs-dist 2.9.359 Not sure how to proceed, as we should really be using non-legacy code here. Perhaps a workaround based on webpack alias might be of any help. |
ORZ!! The breaking change is released with a minor version? |
Lol, that's classic PDF.js. Their versions do not follow semver at all. That's the very reason we have |
I'm having this issue #808 in our project and wanted to see when this PR will be merged and released. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to rebase off newest main
and change paths to from /es5 to /legacy
Hi guys, any idea when this is gonna be released? we are facing a similar issue in our project |
It can't be merged before the fixes are made. |
@njleonzhang any idea when you can get this fix done on the PR? Thank you!
|
I'v changed the path from /es5 to /legacy, but haven't tested yet. |
@njleonzhang Thanks for the changes!!! can't wait to use the new code after the PR is merged :) |
Thanks! |
Amazing! Thanks guys! |
react-pdf
supports es5 itself, and its dependencypdfjs-dist
supports es5 throughdist/es5
folder. for entire supporting es5,react-pdf
should require files inpdfjs-dist/dist/es5
.if we don't fix this issue, all users who depend on
react-pdf
have to analyze code ofreact-pdf
, and findpdfjs-dist
causes es5 incompatibility, then addpdfjs-dist
babel transpiling config in their bundle tool(webpack) config. it don't make sense.