Create-react-app: Manifest not found after npm run build

Created on 24 Oct 2019  路  1Comment  路  Source: facebook/create-react-app

Manifest and couple of other static files (fonts) not found after npm run build.

The app was created by create-react-app.

In the public/index.html
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">

Files appear in the build folder and successfully deploys. I can find them using Azure Kudu services.
favicon.ico and other static elements work well. There is an issue only with manifest and two fonts.

For local run :
"app:start": "react-app-env --env-file=dev.env start"
"start": "npm run app:start"

For the build :
"app:dev": "react-app-env --env-file=dev.env build"
"build": "npm run semantic:build && npm run app:build"
"semantic:build": "gulp build --gulpfile ./src/semantic/gulpfile.js"

image

image

What to do?

bug report needs triage

Most helpful comment

Was fixed.
Added piece of code to the public/web.config :

<staticContent>
            <remove fileExtension=".json" />
            <mimeMap fileExtension=".json" mimeType="application/json" />
            <remove fileExtension=".woff" />
            <mimeMap fileExtension=".woff" mimeType="application/font-woff" />
            <remove fileExtension=".woff2" />
            <mimeMap fileExtension=".woff2" mimeType="font/x-woff" />
</staticContent>  

>All comments

Was fixed.
Added piece of code to the public/web.config :

<staticContent>
            <remove fileExtension=".json" />
            <mimeMap fileExtension=".json" mimeType="application/json" />
            <remove fileExtension=".woff" />
            <mimeMap fileExtension=".woff" mimeType="application/font-woff" />
            <remove fileExtension=".woff2" />
            <mimeMap fileExtension=".woff2" mimeType="font/x-woff" />
</staticContent>  
Was this page helpful?
0 / 5 - 0 ratings

Related issues

onelson picture onelson  路  3Comments

xgqfrms-GitHub picture xgqfrms-GitHub  路  3Comments

alleroux picture alleroux  路  3Comments

rdamian3 picture rdamian3  路  3Comments

fson picture fson  路  3Comments