# @peterek/vite-plugin-favicons

> Simple Vite plugin to generate favicons from source image. Nothing more, nothing less.

Latest version **2.1.0** (published 2025-01-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install @peterek/vite-plugin-favicons
pnpm add @peterek/vite-plugin-favicons
yarn add @peterek/vite-plugin-favicons
bun add @peterek/vite-plugin-favicons
```

## Health

**Score 40/100 (D)** — status: maintenance-mode.

Positive: has types; esm support; no vulnerabilities; has provenance.

Warnings: low downloads.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.1.0 |
| Published | 2025-01-05 |
| First published | 2022-04-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=18.0.0 |
| Dependencies | 1 |
| Unpacked size | 6.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 13 |
| Author | Jiri Peterek |
| Maintainers | peterek |
| Keywords | vite-plugin, favicon, favicons, image, ico, icon, generate, generator |

## Links

- npm: https://www.npmjs.com/package/@peterek/vite-plugin-favicons
- Repository: https://github.com/peterekjs/vite-plugin-favicons
- Homepage: https://github.com/peterekjs/vite-plugin-favicons#readme
- Issues: https://github.com/peterekjs/vite-plugin-favicons/issues
- npm.io page: https://npm.io/package/@peterek/vite-plugin-favicons

## Dependencies (1)

- [favicons](https://npm.io/package/favicons.md) ^7.1.5

## Alternatives

- [@fortawesome/react-fontawesome](https://npm.io/package/@fortawesome/react-fontawesome.md) — 2.2M weekly downloads
- [roboto-fontface](https://npm.io/package/roboto-fontface.md) — 196.0K weekly downloads
- [@react-native-vector-icons/common](https://npm.io/package/@react-native-vector-icons/common.md) — 150.4K weekly downloads
- [stockfish](https://npm.io/package/stockfish.md) — 27.0K weekly downloads
- [@procore/core-icons](https://npm.io/package/@procore/core-icons.md) — 4.6K weekly downloads

## Recent versions

- 2.1.0 (latest) — 2025-01-05
- 2.0.0 — 2024-02-01
- 1.0.0 — 2023-03-31
- 0.1.1 — 2023-02-14
- 0.1.0 — 2022-04-10
- 0.0.3 — 2022-04-09
- 0.0.2 — 2022-04-09
- 0.0.1 — 2022-04-09
- 0.0.0 — 2022-04-09

## README

# @peterek/vite-plugin-favicons
Simple Vite plugin using [favicons](https://github.com/itgalaxy/favicons) library under the hood
to generate favicons with manifest files from yor source image. Nothing more, nothing less.

1. Add plugin to your Vite configuration
    ```js
    // vite.config.js
    import favicons from '@peterek/vite-plugin-favicons'

    export default {
      plugins: [
        favicons('src/assets/icon.svg')
      ]
    }
    ```

1. Then just enter `<!-- FAVICONS -->` comment at the end of head section in the `index.html` file
```html
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>My Vite app</title>
    <!-- FAVICONS -->
  </head>
  <body>
    <div id="app"></div>
    <script type="module" src="/src/main.ts"></script>
  </body>
</html>

```


## Contribution

You're free to contribute to this project by submitting [issues](https://github.com/josh-hemphill/vite-plugin-favicon/issues) and/or [pull requests](https://github.com/josh-hemphill/vite-plugin-favicon/pulls).

## License

This project is licensed under [MIT](https://github.com/josh-hemphill/vite-plugin-favicon/blob/latest/LICENSE).

[favicons]: https://github.com/haydenbleasel/favicons

---
_Source: https://npm.io/package/@peterek/vite-plugin-favicons · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
