Manifest.json loads index.html on Google Chrome
The React App I am building has a manifest.json as follows, created when I first used Create-React-App:
{
"short_name": "React App",
"name": "Create React App Sample",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
}
],
"start_url": ".",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}
However, when I publish the website using AWS-Amplify to a S3 bucket, the manifest.json loads my index.html instead. The first index.html response has the right header to my manifest.json, as below:
<link rel="manifest" href="/manifest.json">
Link to my manifest seems right and my website requested for it, only to have another index.html as response. The manifest.json file is located in the same directory as index.html.
In my localhost, the manifest.json loads nicely. When I tried building it and serve it from the build folder, the manifest.json also loads nicely. This problem only happens in our deployed website. I have checked the deployment files in S3 and it looks exactly the same as our built files so I don't know what is wrong.
I suspect it could be a Chrome issue because Manifest.json is not requested in Firefox and Edge. However, this does not explain why my localhost and local build is able to load manifest.json successfully in Chrome.
I expect manifest.json to be an actual json file, and not index.html.