gatsby: [gatsby-plugin-manifest] Favicon not updated on navigating to child app
Description
First, some notes on terminology:
- “Main app” refers to the PWA created by the main manifest by default.
- “Child app” refers to the PWA created by the additional manifests generated by the use of the
localizeoption.
When a child app in localize is loaded, the icon in the child manifest is not used for the favicon or apple-touch-icon links.
Conditions
The plugin options for gatsby-plugin-manifest include a child app via the localize array and it specifies a different icon.
// gatsby-config.js
{
resolve: "gatsby-plugin-manifest",
options: {
name: "Hello World",
start_url: "/",
icon: "src/images/gatsby-icon.png",
localize: [
{
start_url: "/es/",
lang: "es",
name: "Hola Mundo",
icon: "src/images/gatsby-icon-es.png",
},
],
},
}
Steps to reproduce
Demo repo: https://github.com/dkthehuman/gatsby-manifest-l10n-bug-demo Netlify: https://affectionate-franklin-dc4bfb.netlify.com
- Navigate to the Netlify demo (or run
gatsby build && gatsby serveon the test repo)- The favicon and
apple-touch-iconlinks point togatsby-icon.png(the purple Gatsby icon) as expected
- The favicon and
- Click on the “Spanish” link to navigate to /es/.
- The favicon does not update to
gatsby-icon-es.png(a red dot) as it should
- The favicon does not update to
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 15 (11 by maintainers)
@moonmeister Nope, that was a different issue.
This issue has to do with the favicons not updating when navigating to a part of the app under a different manifest (what I’m calling a “child app”). With #17426, the manifest is now updated but the favicon is not.