Skip to content

Update pdfjs-dist and related deps

jsteinmann requested to merge update-pdfjs into master

This updates pdfjs-dist to the latest version. The newer versions of pdfjs-dist require Webpack 5. This requires us to update react-scripts (since that part of create-react-app determines our webpack version). Finally eslint-webpack-plugin also had to be updated to support Webpack 5. There should be some minor performance benefits due to Webpack 5.

worker-loader is deprecated for Webpack 5. (https://v4.webpack.js.org/loaders/worker-loader/) There's a newer Worker syntax, and I removed worker-loader in favor of it. I got rid of re-exporting the worker to static/ (since the newer syntax doesn't support that without hacks) and I'm not sure if this will break anything. In principle the issue #77 (closed) should be solved because of the import change in pdf-renderer.ts. The warning there doesn't appear anymore even without re-exporting.

We should test this on staging and see if any errors / issues appear due to the worker not being re-exported.

Merge request reports

Loading