Manifest: Line: 1, column: 1, Unexpected token. [Ionic 4]

#1

I am trying to optimize my app with lighthouse

I have added

<link rel="manifest"  href="./manifest.json">

to the index.html

then i have manifest.json as follows

{
    "name": "Ionic App",
    "short_name": "Ionic App",
    "theme_color": "#222428",
    "background_color": "#000000",
    "display": "standalone",
    "scope": "/",
    "start_url": "/index.html",
    "splash_pages": null,
    "orientation": "portrait",
    "icons": [
        {
            "src": "/assets/icons/favicon.png",
            "type": "image/png",
            "sizes": "192x192"
          }
    ]
}

I have tried compiling with the manifest file in the root and in src/
When i build with --prod --release and deploy to firebase, get the following error

Manifest: Line: 1, column: 1, Unexpected token.

and the lighthouse audit scores Performance 18 and PWA 31, and the rest of the scores are green

Does anyone have any insight into optimizing an Ionic app for PWA status? I have followed several tutorials to no avail and its driving me crazy.
here is a screenshot of the audit

#2

Have you find a solution ?
If yes, could you post it ?

I’m having the same issue …

#3

I think my solution was to put these files in the output folder (www) instead of in the src or root.

Let me know if that works for you