gatsby-plugin-manifest doesn't allow app shortcuts
See original GitHub issueDescription
Adding app shortcuts
to the plugin options in gatsby-plugin-manifest 2.5.0+ results in an Invalid plugin options error
I think this was caused by enabling ‘plugin option validation’, released in #27437 and published in 2.5.0 of gatsby-plugin-manifest. The new options validation doesn’t include the shortcuts
option. It worked before 2.5.0 - I’ve just upgraded from 2.4.21 where it was working.
Steps to reproduce
- Install gatsby-plugin-manifest 2.5.0
- Add
shortcuts
to the plugin’s options:
// gatsby-config.s
module.exports = {
plugins: [
{
resolve: `gatsby-plugin-manifest`,
options: {
+ shortcuts: [
+ { name: "Topics A to Z", url: "/topics/?utm_source=a2hs&utm_medium=shortcuts", }
+ ]
}
}
]
}
Expected result
Shortcuts are added to the generated manifest.webmanifest
Actual result
You get the following CLI error:
error Invalid plugin options for “gatsby-plugin-manifest”: “shortcuts” is not allowed
Environment
System: OS: Windows 10 10.0.19041 CPU: (4) x64 Intel® Core™ i7-5500U CPU @ 2.40GHz Binaries: Node: 12.16.3 - C:\Program Files\nodejs\node.EXE Yarn: 1.16.0 - C:\Program Files (x86)\Yarn\bin\yarn.CMD npm: 6.14.4 - C:\Program Files\nodejs\npm.CMD Languages: Python: 2.7.11 Browsers: Chrome: 86.0.4240.183 Edge: Spartan (44.19041.423.0) npmPackages: gatsby: ^2.25.3 => 2.25.3 gatsby-plugin-catch-links: ^2.3.15 => 2.3.15 gatsby-plugin-eslint: ^2.0.8 => 2.0.8 gatsby-plugin-google-tagmanager: ^2.4.0 => 2.4.0 gatsby-plugin-manifest: ^2.5.2 => 2.5.2 gatsby-plugin-offline: ^3.3.2 => 3.3.2 gatsby-plugin-preact: ^4.0.16 => 4.0.16 gatsby-plugin-prefetch-google-fonts: ^1.4.3 => 1.4.3 gatsby-plugin-react-helmet: ^3.3.14 => 3.3.14 gatsby-plugin-sass: ^2.4.2 => 2.4.2 gatsby-plugin-sitemap: ^2.5.1 => 2.5.1 gatsby-plugin-split-css: ^1.0.2 => 1.0.2 gatsby-plugin-typescript: ^2.5.0 => 2.5.0 gatsby-react-router-scroll: 3.0.0 => 3.0.0
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:11 (9 by maintainers)
Top GitHub Comments
@mxstbr I wish I could build such a big code base with so few (noticeable) bugs. Congrats and thanks for an overall astoundingly great job!
Not a breaking change, simply an oversight bug! Sorry about the troubles, looking forward to your PR @ediblecode 🙏 The code for this is in gatsby-plugin-manifest’s
gatsby-node.js
.