mirror of
https://github.com/lobehub/lobehub.git
synced 2026-03-26 13:19:34 +07:00
🐛 fix(pdf): upgrade pdfjs-dist and react-pdf to v5.x (#11686)
* 🐛 fix(pdf): upgrade pdfjs-dist and react-pdf to v5.x Resolves: LOBE-2658 - Upgrade pdfjs-dist from 4.x to 5.4.530 - Upgrade react-pdf from 9.x to 10.3.0 - Fix PDF worker loading using import.meta.url pattern - Add @napi-rs/canvas dependency for react-pdf renderer - Fix typo: ResouceManagerMode → ResourceManagerMode - Clean up meaningless comments in ListItem component - Simplify next config by removing unused isDesktop logic * chore: update claude Signed-off-by: Innei <tukon479@gmail.com> * 🐛 fix(pdf): update PDF version in snapshots to 5.4.530 - Updated pdfVersion in PDF loader snapshots to reflect the new version 5.4.530. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(file-loaders): implement lazy loading for file loaders - Refactored file loader imports to use dynamic loading, improving performance by preventing heavy dependencies from being loaded until needed. - Introduced `getFileLoader` function to manage loader retrieval based on file type. - Updated logging and fallback mechanisms for unsupported file types. This change enhances the efficiency of file loading operations. Signed-off-by: Innei <tukon479@gmail.com> * ✨ feat(config): enhance next configuration for improved package handling - Updated `nextConfig` to include `@napi-rs/canvas` and `pdfjs-dist` in `serverExternalPackages` to address bundling issues with Turbopack. - Removed unused `isDesktop` logic and simplified the configuration structure. - Adjusted `transpilePackages` to exclude `pdfjs-dist`, reflecting recent upgrades. This change optimizes the configuration for better compatibility and performance. Signed-off-by: Innei <tukon479@gmail.com> * 🐛 fix: use CDN pdfjs worker --------- Signed-off-by: Innei <tukon479@gmail.com>
This commit is contained in:
@@ -13,6 +13,7 @@ overrides:
|
||||
'@swagger-api/apidom-reference': 1.1.0
|
||||
jose: ^6.1.3
|
||||
stylelint-config-clean-order: 7.0.0
|
||||
pdfjs-dist: 5.4.530
|
||||
|
||||
patchedDependencies:
|
||||
'@swagger-api/apidom-reference': patches/@swagger-api__apidom-reference.patch
|
||||
|
||||
Reference in New Issue
Block a user