Skip to content

Commit 0d574f6

Browse files
Merge pull request #17224 from Snuffleupagus/dist-webpack
Update `external/dist/webpack.js` to account for outputting of JavaScript modules (PR 17055 follow-up)
2 parents 9eb9d3f + 13ca668 commit 0d574f6

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

external/dist/webpack.js renamed to external/dist/webpack.mjs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,15 @@
1212
* See the License for the specific language governing permissions and
1313
* limitations under the License.
1414
*/
15-
/* eslint-disable import/no-commonjs */
15+
/* eslint-disable import/no-unresolved */
1616

17-
"use strict";
18-
19-
const pdfjs = require("./build/pdf.mjs");
17+
import { GlobalWorkerOptions } from "./build/pdf.mjs";
2018

2119
if (typeof window !== "undefined" && "Worker" in window) {
22-
pdfjs.GlobalWorkerOptions.workerPort = new Worker(
20+
GlobalWorkerOptions.workerPort = new Worker(
2321
new URL("./build/pdf.worker.mjs", import.meta.url),
2422
{ type: "module" }
2523
);
2624
}
2725

28-
module.exports = pdfjs;
26+
export * from "./build/pdf.mjs";

0 commit comments

Comments
 (0)