Skip to content
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

pdfjsLib is not exposed in the minified legacy build #18290

Closed
sergiubologa opened this issue Jun 19, 2024 · 2 comments · Fixed by #18292
Closed

pdfjsLib is not exposed in the minified legacy build #18290

sergiubologa opened this issue Jun 19, 2024 · 2 comments · Fixed by #18292
Labels

Comments

@sergiubologa
Copy link

sergiubologa commented Jun 19, 2024

Configuration:

  • Web browser and its version: Chrome 126.0.6478.62
  • Operating system and its version: Windows
  • PDF.js version: 4.3.136
  • Is a browser extension: no

Steps to reproduce the problem:

  1. Install the version 4.3.136
  2. Search in the node_modules\pdfjs-dist\legacy\build\pdf.min.mjs file for pdfjsLib string.

What is the expected behavior? (add screenshot)
It should be found and exposed on the window object when loaded in the browser.

What went wrong? (add screenshot)
The pdfjsLib is not exposed anymore. It is exposed instead on all other build options:

  • node_modules\pdfjs-dist\legacy\build\pdf.mjs
  • node_modules\pdfjs-dist\build\pdf.min.mjs
  • node_modules\pdfjs-dist\build\pdf.mjs

I can see that the tweakWebpackOutput function in the gulpfile expects the string ",__webpack_exports__={};" to exist in the minified file. But looking at the published minified file it looks like this var __webpack_exports__={};. Is this a webpack issue?

@sergiubologa
Copy link
Author

sergiubologa commented Jun 19, 2024

@timvandermeij when will this fix be released?

@timvandermeij
Copy link
Contributor

We normally create a new release at the end of every month, unless release blockers are identified before that time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants