Please help me testing React-PDF 5.0 beta update!
See original GitHub issueHi, React-PDF v5.0.0-beta.5 has been released introducing a few major updates:
- React-PDF now ships with ES6 Modules
- Updated pdf.js from 2.1.266 to 2.4.456.
Breaking changes:
- You will need to change your imports to bundler-specific entry files, for example instead of:
you’ll now write:import { Document } from 'react-pdf/dist/entry.webpack';
import { Document } from 'react-pdf/dist/esm/entry.webpack';
- Dropped support for IE 11 due to pdf.js dropping support
so upgrade should be a piece of cake.
Please share your experiences - whether it works correctly in your project, doesn’t break the build, and so on.
Thanks!
Issue Analytics
- State:
- Created 4 years ago
- Comments:41 (21 by maintainers)
Top Results From Across the Web
Keywords - react-pdf - npm
Start using react-pdf in your project by running `npm i react-pdf`. ... react-pdf. 5.1.0-beta • Public • Published 2 years ago.
Read more >Displaying PDF in React app - Level Up Coding
I want to show you an easy and simple way to display PDF files using React in the browser. I will be using...
Read more >Enzyme is dead. Now what? - DEV Community
Enzyme, a popular utility to test React components, is dead. It's time to move on. Here's why I think so. For a long...
Read more >Thinking in React
React is, in our opinion, the premier way to build big, fast Web apps with JavaScript. It has scaled very well for us...
Read more >Could not resolve dependency error peer react@"^16.8.0
Instead of npm install, please use npm install --legacy-peer-deps. ... tend to give you better error messages which has helped me in the ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Just an FYI that the latest breaks IE11 due to pdf.js deciding to remove support for it (annoyingly in a minor version).
The
pdfjs-dist/es5
imports you switched to are fine, but things imported frompdfjs-dist/lib
likePDFLinkService
aren’t transpiled, and still have classes in the final output. It took a while to figure out what was going on, and we solved it by configuring babel to that transpile imports from that module.The CDN link for pdf.worker.js is also no longer transpiled, so we switched to
pdfjs.GlobalWorkerOptions.workerSrc = `//unpkg.com/pdfjs-dist@${pdfjs.version}/es5/build/pdf.worker.js`;
With v5.0.0-beta.4 I am seeing the following error in the console. Anyone else experiencing the same?