mozilla / pdf.js

PDF Reader in JavaScript
https://mozilla.github.io/pdf.js/
Apache License 2.0
47.09k stars 9.81k forks source link

`pdfjsLib` is not exposed in the minified legacy build #18290

Closed sergiubologa closed 1 week ago

sergiubologa commented 1 week ago

Configuration:

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:

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 commented 1 week ago

@timvandermeij when will this fix be released?

timvandermeij commented 1 week ago

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