When site.webmanifest file that is not in root directory, icons paths are incorrect
See original GitHub issue🐛 bug report
- Take a look at this project, which builds a simple html file + site.webmanifest with parcel@1.12.3
- The manifest is at the path
static/site.webmanifest
(code) - When it gets built, it references the file at
/static/site.webmanifest
(code) - The “icons” within that file links to the image at
test-webmanifest.2044b095.png
(code) — which should be relative to the webmanifest insidestatic/
- But the actual image is placed in the root of the
dist/
foldr (dist directory)
🎛 Configuration (.babelrc, package.json, cli command)
See the above repo.
🤔 Expected Behavior
I would expect the test-webmanifest.2044b095.png
file to end up in the static/
directory.
According to the examples (Google Developers Web App Manifest, MDN Web Manifest) for the manifest of a PWA, the “icons” file paths should include the paths to files.
Albeit, this is different from browser extensions manifests (MDN extension manifest docs)
😯 Current Behavior
I would expect the test-webmanifest.2044b095.png
file is placed in the root of the dist/
directory.
💁 Possible Solution
It seems like linked assets in a webmanifest file should be placed in the proper relative directory.
As a workaround, I just moved everything to the root directory of my static app.
🔦 Context
💻 Code Sample
See the above repo.
🌍 Your Environment
Software | Version(s) |
---|---|
Parcel | 1.12.3 |
Node | 12.9.0 |
Yarn | 1.6.0 |
Operating System | OS X 10.14.6 |
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:6
Top Results From Across the Web
PWA Manifest can't find resources - Stack Overflow
My manifest and icons are all stored in the root folder of my project, but the manifest somehow can't find them.
Read more >Web Application Manifest - W3C
This specification defines a JSON-based file format that provides developers with a centralized place to put metadata associated with a web ...
Read more >gatsby-plugin-manifest - npm
Gatsby plugin which adds a manifest.webmanifest to make sites progressive ... This path is relative to the root of the site. icons: [...
Read more >Extension Manifest Reference - Azure DevOps | Microsoft Learn
Start by creating a file named vss-extension.json at the root of ... The value of each key is the path to the icon...
Read more >Add a web app manifest
json and served from the root (your website's top-level directory). The specification suggests the extension should be .webmanifest , but ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Still an issue
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs.