How to replace Spartacus desktop icon?

Viewed 19

When we navigate to our new SAP Spartacus web site, due to the PWA nature of the app, we can choose to install the application on the device we're using. When installing the app happens, the default icon provided in the Spartacus code is used, and I can see in the Spartacus code where it looks like this file came from:

..\js-storefront\mymobilestore\src\assets\icons

The name of the file from the Spartacus code that's used is 'icon-128x128.png', and I can see this file being referenced in the following file:

..\js-storefront\mymobilestore\src\manifest.webmanifest

Here's is where I found the reference to this icon file:

"icons": [ { "src": "assets/icons/icon-72x72.png", "sizes": "72x72", "type": "image/png", "purpose": "maskable any" }, { "src": "assets/icons/icon-96x96.png", "sizes": "96x96", "type": "image/png", "purpose": "maskable any" }, { "src": "assets/icons/icon-128x128.png", "sizes": "128x128", "type": "image/png", "purpose": "maskable any" }, { "src": "assets/icons/icon-144x144.png", "sizes": "144x144", "type": "image/png", "purpose": "maskable any" },

We want to replace the default icon used when you install Spartacus on your device with a custom one that reflects our company. I figured that it would be as easy as simply putting our custom icon in the ..\js-storefront\mymobilestore\src\assets\icons folder and then update the area of the manifest.webmanifest file that references this file. Unfortunately, this is not working for me as the original Spartacus icon is still being used.

Can anyone share with me what I'm doing wrong? How do I replace the default icon used when installing our Spartacus app on a device?

0 Answers
Related