Update pdfjs-viewer docs for v4.6.1: the hashed data folder
Merged
AL
10h ago+8+8+0123456789-7-7-0123456789
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 putsviewer.mjs,pdf.mjsand their data in a folder named after a hash of their content, such asassets/pdfjs-viewer-84204294/. An app's ownassetFileNamesstill decides where the two files go, and caching the build's assets asimmutableis 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 buildpasses, and everyhref="#ā¦"on_site/pdfjs-viewer/index.htmlmatches an id.- The installed 4.6.1 package contains the plugin with the hashed folder (
outputOptionsandgetFolderNameinplugins/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-basefor fixed URLs; an upgrade that changes the files gets a new folder, soimmutablecaching 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.