fix: resolve react-pdf v7 worker configuration (fixes #330) #376
+413
−48
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes the failed Renovate bot update (#330) which attempted to update react-pdf from v5 to v7 for security improvements.
Context
Renovate bot PR #330 failed due to breaking changes in react-pdf v7's worker configuration. This PR implements the necessary changes to support v7.
Changes
Technical Details
In react-pdf v7, the PDF worker can't be imported directly from react-pdf package anymore because:
react-pdf/dist/esm/pdf.worker.entry
is not available in v7Solution Options Considered:
Local worker (pdfjs-dist)
CDN approach (Selected)
Benefits:
Dependencies
Related Issues