Update pdfjs-viewer docs for v4.6.1: the hashed data folder

Merged
AL
10h ago
+8-7

Summary

Docs for @missing-elements/pdfjs-viewer 4.6.1 (pdfjs-viewer#88).

  • Bump the pinned package to 4.6.1. The CDN examples now show @4.6.1.
  • Vite plugin: the caching paragraph used to say the data keeps fixed URLs and suggested a short cache or assets-base. It now says the plugin puts viewer.mjs, pdf.mjs and their data in a folder named after a hash of their content, such as assets/pdfjs-viewer-84204294/. An app's own assetFileNames still decides where the two files go, and caching the build's assets as immutable is safe.
  • Migrating: a new "From 4.6.0" step. The plugin's output moves into the hashed folder, and the cache rule the 4.6.0 docs suggested can be removed.

Validation

  • pnpm build passes, and every href="#…" on _site/pdfjs-viewer/index.html matches an id.
  • The installed 4.6.1 package contains the plugin with the hashed folder (outputOptions and getFolderName in plugins/vite.js).

šŸ¤– Generated with Claude Code


Summary by cubic

Docs for @missing-elements/pdfjs-viewer 4.6.1, whose Vite plugin now puts viewer.mjs, pdf.mjs, and their data in a folder named after a hash of their content, such as assets/pdfjs-viewer-84204294/.

Docs

  • The caching paragraph no longer suggests a short cache or assets-base for fixed URLs; an upgrade that changes the files gets a new folder, so immutable caching is safe.
  • The pinned package bumps to 4.6.1, so the CDN examples now show @4.6.1.

Migration

  • Adds a "From 4.6.0" step: the plugin's output moves into the hashed folder, so a short cache rule set up per the 4.6.0 docs no longer matches and can be removed.