From 66f049e733c295d1f35677e195108617695a7bbe Mon Sep 17 00:00:00 2001 From: Michael Shilman Date: Wed, 19 Apr 2017 07:35:25 -0700 Subject: [PATCH] Fix SPA deep-linking problem --- 404.html | 5 +++++ package.json | 2 +- public/index.html | 9 +++++++++ 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 404.html diff --git a/404.html b/404.html new file mode 100644 index 000000000000..7f83bf6ec9e7 --- /dev/null +++ b/404.html @@ -0,0 +1,5 @@ + + + diff --git a/package.json b/package.json index 7add781dc00d..888f03f000c6 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,6 @@ "eject": "react-scripts eject", "storybook": "start-storybook -p 9009", "build-storybook": "build-storybook", - "publish": "npm run build && cp ./CNAME ./build && cd build && git init . && git remote add origin $( cd .. && git remote get-url origin ) && git add . && git commit -m 'Update build' && git push -f origin master" + "publish": "npm run build && cp ./404.html ./build && cp ./CNAME ./build && cd build && git init . && git remote add origin $( cd .. && git remote get-url origin ) && git add . && git commit -m 'Update build' && git push -f origin master" } } diff --git a/public/index.html b/public/index.html index f5fb0bbe2239..885cba5d2c01 100644 --- a/public/index.html +++ b/public/index.html @@ -28,6 +28,15 @@ ga('create', 'UA-48364339-10', 'auto'); ga('send', 'pageview'); +