Skip to content

Instantly share code, notes, and snippets.

@leomelzer
Created Jan 8, 2019
Embed
What would you like to do?
now.json file with routing rules for a Create-React-App.
{
"version": 2,
"name": "jetztein",
"alias": "jetztein.de",
"builds": [{ "src": "package.json", "use": "@now/static-build" }],
"regions": ["bru"],
"routes": [
{ "src": "^/static/(.*)", "dest": "/static/$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": "^/(.*)", "dest": "/index.html" }
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment