pdf.js/examples/webpack
2018-06-02 20:28:36 +02:00
..
.gitignore Adds/modifies examples for node.js and webpack. 2015-12-21 13:46:50 -06:00
index.html Removing "entry-loader" dependency from webpack. 2016-04-13 08:24:25 -05:00
main.js Move the workerSrc option from the global PDFJS object and into GlobalWorkerOptions instead 2018-02-16 13:22:35 +01:00
package.json Upgrade to Webpack 4 2018-06-02 20:28:36 +02:00
README.md Upgrade to Webpack 4 2018-06-02 20:28:36 +02:00
webpack.config.js Upgrade to Webpack 4 2018-06-02 20:28:36 +02:00

Overview

Example to demonstrate PDF.js library usage with Webpack.

Getting started

Install the example dependencies and build the project:

$ gulp dist-install
$ cd examples/webpack
$ npm install
$ ./node_modules/webpack/bin/webpack.js

You can observe the build results by running gulp server and navigating to 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.