Skip to content

Instantly share code, notes, and snippets.

@dehamzah
Created April 14, 2020 14:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dehamzah/47275321a4e82a5c82310b358f9a2bba to your computer and use it in GitHub Desktop.
Save dehamzah/47275321a4e82a5c82310b358f9a2bba to your computer and use it in GitHub Desktop.
now.json config url rewrite for react app
{
"name": "supertesting-test2",
"alias": "supertesting-test2.now.sh",
"version": 2,
"builds": [
{
"src": "package.json",
"use": "@now/static-build"
}
],
"routes": [
{
"src": "^/static/(.*)",
"dest": "/static/$1"
},
{
"src": "^/images/(.*)",
"dest": "/images/$1"
},
{
"src": "^/favicon.ico",
"dest": "/favicon.ico"
},
{
"src": "^/asset-manifest.json",
"dest": "/asset-manifest.json"
},
{
"src": "^/manifest.json",
"dest": "/manifest.json"
},
{
"src": "^/service-worker.js",
"headers": {
"cache-control": "s-maxage=0"
},
"dest": "/service-worker.js"
},
{
"src": "^/precache-manifest.(.*)",
"dest": "/precache-manifest.$1"
},
{
"src": "^/boka",
"dest": "/boka/index.html"
},
{
"src": "^/(.*)",
"dest": "/index.html"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment