Skip to content

Update pdf worker file path in pdf viewer

Chaoyue Zhao requested to merge 500534-pdf-worker-path into master

What does this MR do and why?

After updating the pdf worker file path to include version number in !168419 (merged), the path used in vue component was still pointing to the old path. This broke pdf viewer.

This MR updates to read the path from the environment variables and simplified the path for worker file to /assets/webpack/pdfjs/3.11.174/pdf.worker.min.js.

References

Please include cross links to any resources that are relevant to this MR This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

How to set up and validate locally

  1. follow the instructions to run the app in webpack and vite
  2. clear the webpack/vite cache with rm -rf tmp/cache/webpack and rm -rf tmp/cache/vite
    1. this is crucial as app might renders fine with cached files
  3. viewing pdf files should work as expected

Related to #500534 (closed)

Edited by Chaoyue Zhao

Merge request reports

Loading