question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

When site.webmanifest file that is not in root directory, icons paths are incorrect

See original GitHub issue

🐛 bug report

  1. Take a look at this project, which builds a simple html file + site.webmanifest with parcel@1.12.3
  2. The manifest is at the path static/site.webmanifest (code)
  3. When it gets built, it references the file at /static/site.webmanifest (code)
  4. The “icons” within that file links to the image at test-webmanifest.2044b095.png (code) — which should be relative to the webmanifest inside static/
  5. 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:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:6

github_iconTop GitHub Comments

3reactions
nevircommented, Mar 29, 2020

Still an issue

0reactions
github-actions[bot]commented, Feb 19, 2021

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found