Simple Vite plugin using favicons library under the hood to generate favicons with manifest files from yor source image. Nothing more, nothing less.
-
Add plugin to your Vite configuration
// vite.config.js import favicons from "@gburning/vite-plugin-favicons" export default { plugins: [favicons("src/assets/icon.svg")], }
-
Then just enter
<!-- FAVICONS -->comment at the end of head section in theindex.htmlfile
<!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>You're free to contribute to this project by submitting issues and/or pull requests.
This project is licensed under MIT.
Based on (@peterekjs/vite-plugin-favicons)[https://github.com/peterekjs/vite-plugin-favicons]