pdf.js/examples/webpack/webpack.config.js
Jonas Jenwald d7b39fe696 Update the webpack example to account for outputting of JavaScript modules (PR 17055 follow-up)
*Please note:* While following the steps in the README still works with this patch, in the sense that the example runs and successfully renders a PDF document, I unfortunately cannot tell if it illustrates Webpack best practices.
2023-10-28 10:26:34 +02:00

19 lines
445 B
JavaScript

/* eslint-disable import/no-commonjs */
const webpack = require("webpack"); // eslint-disable-line no-unused-vars
const path = require("path");
module.exports = {
context: __dirname,
entry: {
main: "./main.mjs",
"pdf.worker": "pdfjs-dist/build/pdf.worker.mjs",
},
mode: "none",
output: {
path: path.join(__dirname, "../../build/webpack"),
publicPath: "../../build/webpack/",
filename: "[name].bundle.js",
},
};