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:
commit
0d574f66bc
@ -12,17 +12,15 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
/* eslint-disable import/no-commonjs */
|
/* eslint-disable import/no-unresolved */
|
||||||
|
|
||||||
"use strict";
|
import { GlobalWorkerOptions } from "./build/pdf.mjs";
|
||||||
|
|
||||||
const pdfjs = require("./build/pdf.mjs");
|
|
||||||
|
|
||||||
if (typeof window !== "undefined" && "Worker" in window) {
|
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),
|
new URL("./build/pdf.worker.mjs", import.meta.url),
|
||||||
{ type: "module" }
|
{ type: "module" }
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = pdfjs;
|
export * from "./build/pdf.mjs";
|
Loading…
x
Reference in New Issue
Block a user