Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Angular not serving manifest.webmanifest

Tags:

angular

In my Angular 10 app, I publish it to Azure and it loads fine.

However, the manifest.webmanifest is not being served when I go to https://THESITE.azurewebsites.net/manifest.webmanifest, I get:

"The resource you are looking for has been removed, had its name changed, or is temporarily unavailable."

Other files like the Robots.txt serve fine.

My Angular.json has:

"outputPath": "dist/",
        "index": "src/index.html",
        "main": "src/main.ts",
        "polyfills": "src/polyfills.ts",
        "tsConfig": "tsconfig.app.json",
        "aot": true,
        "assets": [
          "src/favicon.ico",
          "src/assets",
          "src/robots.txt",
          "src/manifest.webmanifest"
        ],

And in the Azure App Service Editor, I can see it:

enter image description here

I am guessing that the file type "webmanifest" is the issue? Azure won't serve it?

like image 702
Ian Vink Avatar asked Aug 14 '26 12:08

Ian Vink


1 Answers

I had a similar problem when publishing an Angular Pwa to Azure. The webmanifest wasn't found. To fix it i had to add a web.config file to the dist folder with this code:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <staticContent>
            <mimeMap fileExtension=".json" mimeType="application/json" />
            <mimeMap fileExtension=".webmanifest" mimeType="application/json" />
        </staticContent>
     </system.webServer>
</configuration>
like image 71
Juan Hernandez Avatar answered Aug 16 '26 02:08

Juan Hernandez



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!