From d52d1e2d09e5706f4f9a6fe8693e88c2bfa84a74 Mon Sep 17 00:00:00 2001 From: dhuang612 Date: Mon, 19 Aug 2019 15:36:06 -0400 Subject: [PATCH] added in information about pdfjs/webpack updated readme with corrections --- examples/webpack/README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/examples/webpack/README.md b/examples/webpack/README.md index 24a56c34d..f3964319b 100644 --- a/examples/webpack/README.md +++ b/examples/webpack/README.md @@ -17,3 +17,11 @@ http://localhost:8888/examples/webpack/index.html. Refer to the `main.js` and `webpack.config.js` files for the source code. Note that PDF.js packaging requires packaging of the main application and 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: + + import pdfjsLib from 'pdfjs-dist/webpack'; + +For a full working example refer to [this repository](https://github.com/yurydelendik/pdfjs-react).