Skip to content

Commit

Permalink
Update external/dist/webpack.js to account for outputting of JavaSc…
Browse files Browse the repository at this point in the history
…ript modules (PR 17055 follow-up)

Hopefully this makes sense, since I don't know enough about Webpack to tell exactly how this file is being used in practice.
  • Loading branch information
Snuffleupagus committed Nov 4, 2023
1 parent 9eb9d3f commit 13ca668
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions external/dist/webpack.js → external/dist/webpack.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint-disable import/no-commonjs */
/* eslint-disable import/no-unresolved */

"use strict";

const pdfjs = require("./build/pdf.mjs");
import { GlobalWorkerOptions } from "./build/pdf.mjs";

if (typeof window !== "undefined" && "Worker" in window) {
pdfjs.GlobalWorkerOptions.workerPort = new Worker(
GlobalWorkerOptions.workerPort = new Worker(
new URL("./build/pdf.worker.mjs", import.meta.url),
{ type: "module" }
);
}

module.exports = pdfjs;
export * from "./build/pdf.mjs";

0 comments on commit 13ca668

Please sign in to comment.