From c691cfabe8ea503c529a10c78589881555a322f6 Mon Sep 17 00:00:00 2001 From: Chi Kei Chan Date: Wed, 17 Oct 2018 03:42:41 -0700 Subject: [PATCH] Handle frontend route in Netlify (#46) * Add Netlify route * Add route handling to netlify --- package.json | 2 +- public/_redirect | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 public/_redirect diff --git a/package.json b/package.json index 8bd3dc1171..095983340e 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ }, "scripts": { "start": "react-scripts start", - "build": "react-scripts build", + "build": "react-scripts build && cp build/index.html build/404.html", "test": "react-scripts test --env=jsdom", "eject": "react-scripts eject", "deploy": "npm run build&&gh-pages -d build" diff --git a/public/_redirect b/public/_redirect new file mode 100644 index 0000000000..50a463356b --- /dev/null +++ b/public/_redirect @@ -0,0 +1 @@ +/* /index.html 200 \ No newline at end of file