-
-
Couldn't load subscription status.
- Fork 433
Issue: build: #1130 - Upgrade pdfjs-dist to latest version #1188
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
base: master
Are you sure you want to change the base?
Issue: build: #1130 - Upgrade pdfjs-dist to latest version #1188
Conversation
The following error is thrown when using the library with the old version of pdfjs-dist: 10:22:02 AM [vite] warning: .../src/frontend/.angular/cache/18.2.2/vite/deps/ng2-pdf-viewer.js 11940| const worker = yield import( 11941| /*webpackIgnore: true*/ 11942| this.workerSrc | ^^^^^^^^^^^^^^ 11943| ); 11944| return worker.WorkerMessageHandler; The above dynamic import cannot be analyzed by Vite. See https://github.com/rollup/plugins/tree/master/packages/dynamic-import-vars\#limitations for supported dynamic import formats. If this is intended to be left as-is, you can use the /* @vite-ignore */ comment inside the import() call to suppress this warning.
|
@VadimDez can you please review this PR. |
|
@VadimDez When can you review this PR? |
|
@VadimDez Could you please review this PR whenever possible? I think it can greatly benefit those utilizing this package. |
|
@VadimDez Can you please review this PR? I can't stand this warn on the project anymore and not being able to fix it! |
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.
Nagging rarely works in the OSS world, it just pings all of the other people subscribed...
Anyway, this PR is not actually ready to be merged.
- You should not change the ng2-pdf-viewer version, that is not the job of a PR.
- You dont actually bump the package lock
- Finally, since you are bumping pdfjs-dist across a major version, did you actually take the time to check whether this breaks anything? Indeed, even a cursory check shows it most certainly does:
|
Hi guys! any news? any progress? |
|
@fua03 I am very busy right now, I will try to look at it at the weekend. @shamoon I am really not trying to nag or harass anybody 😄 I just wanted to get rid of these warnings and it was very late in the evening, so yes, I admit, I didn't check weather this breaks anything, my bad 😞. If anyone has the time to check it out, you are welcome to do so 😄. |
|
@shamoon Alright, I reset the version to 10.4.0 and commited and pushed the package-lock.json. I also updated pdfjs again to the latest version 5.2.133. I am unable to reproduce the error you described. Whether I use the old or the new version of pdfjs it still looks the same: I don't know, maybe I am doing something wrong. but, Even in the example On StackBlitz it looks the same. It looks ok to me 😄 |
|
HELP!!! |
|
Thank you @Fabiencdp! |


This PR should resolve the issue #1130. According to this thread, the issue has been resolved in the newest version of pdfjs-dist, a dependency of the ng2-pdf-viewer.
The following error is thrown when using the library with the old version of pdfjs-dist:
10:22:02 AM [vite] warning:
.../src/frontend/.angular/cache/18.2.2/vite/deps/ng2-pdf-viewer.js
11940| const worker = yield import(
11941| /webpackIgnore: true/
11942| this.workerSrc
| ^^^^^^^^^^^^^^
11943| );
11944| return worker.WorkerMessageHandler;
The above dynamic import cannot be analyzed by Vite.
See https://github.com/rollup/plugins/tree/master/packages/dynamic-import-vars\#limitations for supported dynamic import formats. If this is intended to be left as-is, you can use the /* @vite-ignore */ comment inside the import() call to suppress this warning.