A Vite plugin that generates hashed favicons (ico, png, masked, apple-touch, web manifest) from a single optimized SVG source. Current stable version is 2.1.0 (April 2026), with frequent updates following a semver cadence. Unlike heavy favicon generators, this plugin follows the minimalist Evil Martians approach (2021) producing only essential files with content-hash filenames for cache busting. Ships TypeScript types. Requires Vite ^5.0.12 || ^6.0.0 || ^7.0.0 || ^8.0.0 as peer dependency. Key differentiator: zero runtime dependencies, SVG-only input, simplified output set.
npm install vite-plugin-hashed-faviconsVerified import paths — ran on the pinned version, not inferred.
Configures Vite to generate hashed favicons from an SVG source with custom web manifest settings.
Upgrade from v1: ensure source is an optimized SVG file (not PNG). Remove any options related to the old `favicons` package. Check the generated set of icons – only essential ones remain.
If you relied on specific sizes (e.g., 16x16, 48x48), you must generate them separately or adjust expectations.
Set inject: false in plugin options when using virtual:hashed-favicons.
Ensure your project uses Vite 5, 6, 7, or 8. For Vite 4 or below, keep version 1.x or upgrade Vite.
Migrate to v2.0.0+ as described in the changelog. Replace source image with SVG and adjust configuration.
Add `inject: false` to the favicons plugin options.
Use `import favicons from 'vite-plugin-hashed-favicons'` (no curly braces).
Run `npm install vite-plugin-hashed-favicons` and ensure Vite version is ^5.0.12 || ^6.0.0 || ^7.0.0 || ^8.0.0.