I've successfully set my favicon in the index.html file for my Vue webpack SPA. It displays properly when I visit the main site or any standard route, but it fails to show up when I navigate to a dynamic route (path: "/traduzione/:translation"
).
I've attempted to troubleshoot this issue by searching on Google, clearing my cache, and testing on a different computer. Unfortunately, the problem persists on both my local development server and production address.
Below is the relevant code that should help reproduce the issue:
index.html
<link rel="shortcut icon" sizes="96x96" type="image/png" href="static/favicon.png">
router/index.js
routes: [
{ path: "/", name: "Quote", component: Quote },
{ path: "/traduzione/:translation", name: "Traduzione", component: Landing },
{ path: "*", component: PageNotFound }
]
(There is no metadata related code in the Landing component)
I need the favicon to display correctly in the dynamic routes as well. It's puzzling to me why it works fine on some routes but not others, since all components use the same index.html file with the favicon declaration. Any insights or solutions would be greatly appreciated!