Skip to content

Instantly share code, notes, and snippets.

@WassimBenzarti
Created March 29, 2019 15:36
Show Gist options
  • Save WassimBenzarti/c5842a587252e28f88ec72adf84c8308 to your computer and use it in GitHub Desktop.
Save WassimBenzarti/c5842a587252e28f88ec72adf84c8308 to your computer and use it in GitHub Desktop.
Now configuration of Create-React-App
{
"version": 2,
"alias": "",
"public": false,
"builds": [
{
"src": "package.json",
"config": { "distDir": "build" },
"use": "@now/static-build"
}
],
"routes": [
{
"src": "/static/(.*)",
"headers": { "cache-control": "s-maxage=31536000,immutable" },
"dest": "/static/$1"
},
{ "src": "/favicon.ico", "dest": "/favicon.ico" },
{ "src": "/asset-manifest.json", "dest": "/asset-manifest.json" },
{ "src": "/manifest.json", "dest": "/manifest.json" },
{ "src": "/precache-manifest.(.*)", "dest": "/precache-manifest.$1" },
{
"src": "/service-worker.js",
"headers": { "cache-control": "s-maxage=0" },
"dest": "/service-worker.js"
},
{
"src": "/(.*)",
"headers": { "cache-control": "s-maxage=0" },
"dest": "/index.html"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment