From 0ac601f47bde43f4389b3f5834f82d62a3b1f4d3 Mon Sep 17 00:00:00 2001 From: Brent Vatne Date: Wed, 6 May 2020 10:50:09 -0700 Subject: [PATCH] Add now.json to better handle client side routes --- .gitignore | 2 ++ website/.gitignore | 2 ++ website/now.json | 7 +++++++ 3 files changed, 11 insertions(+) create mode 100644 website/now.json diff --git a/.gitignore b/.gitignore index d4235f4..96a308b 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ npm-debug.log node_modules/**/* yarn-error.log .DS_Store + +.now \ No newline at end of file diff --git a/website/.gitignore b/website/.gitignore index 19a24d2..4a90290 100644 --- a/website/.gitignore +++ b/website/.gitignore @@ -5,3 +5,5 @@ build/**/* .expo web-build build + +.now \ No newline at end of file diff --git a/website/now.json b/website/now.json new file mode 100644 index 0000000..97c712a --- /dev/null +++ b/website/now.json @@ -0,0 +1,7 @@ +{ + "version": 2, + "routes": [ + { "src": "^(.*)\\.(.*)$", "dest": "$1.$2" }, + { "src": "^/(.*)", "dest": "/index.html" } + ] +}