Merge pull request #17224 from Snuffleupagus/dist-webpack

Update `external/dist/webpack.js` to account for outputting of JavaScript modules (PR 17055 follow-up)
This commit is contained in:
Tim van der Meij 2023-11-04 15:26:35 +01:00 committed by GitHub
commit 0d574f66bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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";