Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
mrcoles opened this issue Sep 30, 2019 · 7 comments
Labels

Comments

@mrcoles
Copy link

mrcoles commented Sep 30, 2019

🐛 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
@github-actions github-actions bot added the Stale Inactive issues label Mar 29, 2020
@nevir
Copy link

nevir commented Mar 29, 2020

Still an issue

@github-actions github-actions bot removed the Stale Inactive issues label Mar 29, 2020
@timreichen
Copy link

Ran into the same problem.

@bmeunier1974
Copy link

The issue is related to the wrong build method being use for the webmanifest. If you use 'parcel build' you get the un-minified manifest with path to the un-renamed image. If you use 'parcel' to build on the dev server you get the minified webmanifest with link to the renamed images on the root., I'm guessing there is a '!' missing somewhere.

@nettum
Copy link

nettum commented Jul 20, 2020

I'm also getting a minified webmanifest in a subfolder with link to the renamed image on the root.
Should the site.webmanifest be copied to dist/-root (and hashed) on build instead of going into it's own subfolder?

I have index.html at root and site.webmanifest + all other icons in a static-folder.

image

image

image

image

image

image

@bigskillet
Copy link

Ran into the same problem...

@github-actions
Copy link

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.

@github-actions github-actions bot added the Stale Inactive issues label Feb 19, 2021
@github-actions github-actions bot closed this as completed Mar 5, 2021
@Rock-n-Roll-CRC
Copy link

Still an issue.

@github-actions github-actions bot removed the Stale Inactive issues label Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants