Wire favicon via Modern.js html config

Angular's index.html referenced /assets/img/favicon.ico + a PNG icon +
an apple-touch-icon; the React port carried those assets through
config/public/ but never linked them in the HTML head, so the tab icon
was blank and /favicon.ico 404'd. Add html.favicon (copied to publicDir
root) plus html.tags for 16/32 PNG icons and apple-touch-icon.
This commit is contained in:
2026-04-17 22:54:40 +03:00
parent 38b33aa349
commit 3f31ef591c
2 changed files with 30 additions and 0 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

+30
View File
@@ -9,6 +9,36 @@ export default defineConfig({
source: {
entriesDir: "./src",
},
html: {
favicon: "./config/public/favicon.ico",
tags: [
{
tag: "link",
attrs: {
rel: "icon",
type: "image/png",
sizes: "32x32",
href: "/assets/img/favicon-32x32.png",
},
},
{
tag: "link",
attrs: {
rel: "icon",
type: "image/png",
sizes: "16x16",
href: "/assets/img/favicon-16x16.png",
},
},
{
tag: "link",
attrs: {
rel: "apple-touch-icon",
href: "/assets/img/favicon-touch.png",
},
},
],
},
runtime: {
router: {
future: {