1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-19 06:38:07 +02:00

[api-minor] Use new Worker() syntax in webpack entrypoint

This requires Webpack 5 and will break for anyone using Webpack 4.
worker-loader no longer needs to be installed.
This commit is contained in:
Sam Magura 2022-09-12 21:40:58 -04:00
parent 493bb65005
commit 1c2d200918
3 changed files with 4 additions and 14 deletions

View file

@ -28,10 +28,7 @@ otherwise the build is not guaranteed to work correctly.
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) (version 3.0.0 or higher is required), as a
dependency in your project in order to use `pdfjs-dist/webpack` (configuring
`worker-loader` is not necessary; just installing it is sufficient).
Webpack users. Installing `worker-loader` is no longer necessary.
import * as pdfjsLib from 'pdfjs-dist/webpack';