diff --git a/examples/webpack/README.md b/examples/webpack/README.md index f3964319bf8ac..3a4b0e2370b93 100644 --- a/examples/webpack/README.md +++ b/examples/webpack/README.md @@ -20,7 +20,12 @@ the worker code, and the `workerSrc` path shall be set to the latter file. ## Worker loading -If you are getting the `Setting up fake worker` warning, make sure you are importing `pdfjs-dist/webpack` which is the zero-configuration method for Webpack users: +If you are getting the `Setting up fake worker` warning, make sure you are +importing `pdfjs-dist/webpack` which is the zero-configuration method for +Webpack users. You will need to install +[worker-loader](https://github.com/webpack-contrib/worker-loader) as a +dependency in your project in order to use `pdfjs-dist/webpack` (configuring +`worker-loader` is not necessary; just installing it is sufficient). import pdfjsLib from 'pdfjs-dist/webpack'; diff --git a/external/dist/webpack.js b/external/dist/webpack.js index 976728d90e646..ca9cc836861c4 100644 --- a/external/dist/webpack.js +++ b/external/dist/webpack.js @@ -15,14 +15,6 @@ "use strict"; -try { - require.resolve("worker-loader"); -} catch (ex) { - throw new Error( - "Cannot find the `worker-loader` package, please make sure that it's correctly installed." - ); -} - var pdfjs = require("./build/pdf.js"); var PdfjsWorker = require("worker-loader!./build/pdf.worker.js");