Fix the Vite plugin notes from the #108 review
Merged
AL
11h ago+3+3+0123456789-3-3-0123456789
Summary
Fixes the four review comments on #108, which merged before they were addressed. All four were correct:
- Resource attributes (the comment on line 250): the page said
assets-baseor a resource attribute makes the plugin's copy unused. Onlyassets-basedoes that. A resource attribute such asc-map-urlreplaces only its own folder, and the element still loads the rest from the plugin's copy. This matchesgetResourceOptionin the element. - Frameworks bullet (the two comments on line 362): it named only SvelteKit, Nuxt and Astro, so a React or Vue app on plain Vite, or a React Router app, could read past it. It now says any Vite app, with those four as examples.
- Migrating from 4.5.0 (the comment on line 538): it said the plugin can replace the copy of
dist, but not thatassets-basehas to go. Whileassets-baseis set, the element ignores the plugin's copy. The step now says to add the plugin and then removeassets-base, any resource attributes that point at the copy, and the copy step.
Validation
pnpm build passes, and every href="#ā¦" on _site/pdfjs-viewer/index.html matches an id, including the new link to #pdf-js-resources.
š¤ Generated with Claude Code
Summary by cubic
Fixes the four review notes on #108, which merged before they were addressed. The docs now match how the element and plugin actually behave.
- A resource attribute such as
c-map-urlreplaces only its own folder; onlyassets-basemakes the plugin's copy unused. Withoutassets-base, the folders an attribute doesn't replace come from the plugin's copy. - The plugin note now says the Vite plugin works in any Vite app, with SvelteKit, Nuxt, Astro and React Router as examples.
- The 4.5.0 migration step now says to add the plugin, then remove
assets-base, any resource attributes pointing at the copy, and the copy step, since the element ignores the plugin's copy whileassets-baseis set.