Add now.json to better handle client side routes

This commit is contained in:
Brent Vatne
2020-05-06 10:50:09 -07:00
parent 4987c2e588
commit 0ac601f47b
3 changed files with 11 additions and 0 deletions

2
.gitignore vendored
View File

@@ -2,3 +2,5 @@ npm-debug.log
node_modules/**/* node_modules/**/*
yarn-error.log yarn-error.log
.DS_Store .DS_Store
.now

2
website/.gitignore vendored
View File

@@ -5,3 +5,5 @@ build/**/*
.expo .expo
web-build web-build
build build
.now

7
website/now.json Normal file
View File

@@ -0,0 +1,7 @@
{
"version": 2,
"routes": [
{ "src": "^(.*)\\.(.*)$", "dest": "$1.$2" },
{ "src": "^/(.*)", "dest": "/index.html" }
]
}