parcel icon indicating copy to clipboard operation
parcel copied to clipboard

Icons in webmanifest do not resolve

Open JamesAlexanderHill opened this issue 2 years ago • 0 comments

🐛 bug report

When referencing an icon within the shortcuts attribute of a manifest file. The icon does not resolved like other icons in the same file.

This works:

"icons": [
        {
            "src": "./assets/img/icons/shortcut-96x96.png",
            "sizes": "96x96",
            "type": "image/png"
        }
]

however this does not:

"shortcuts" : [
        {
            "name": "Contact Me",
            "url": "/contact",
            "description": "Get in touch today",
            "icons": [
                {
                    "src": "./assets/img/icons/shortcut-96x96.png",
                    "sizes": "96x96",
                    "type": "image/png"
                }
            ]
        }
    ],

🎛 Configuration (.babelrc, package.json, cli command)

Default parcel config

🤔 Expected Behavior

File is hashed, moved to dist folder with correct hash in the name, file that references the icon now references the hashed icon

😯 Current Behavior

File does not hash or get put in the dist folder

Error in application tab of chrome dev tools: icon failed to load

💁 Possible Solution

I guess we just arnt looking for nested icon references

🔦 Context

Add an icon to a shortcut in the manifest.json

💻 Code Sample

N/A

🌍 Your Environment

Software Version(s)
Parcel 2.6.2
Node 16.13.1
npm 8.1.2
Operating System MacOS 11.6.2

JamesAlexanderHill avatar Aug 08 '22 17:08 JamesAlexanderHill