Skip to content

Commit

Permalink
feat: workaround for client side routing
Browse files Browse the repository at this point in the history
  • Loading branch information
robzarel committed Apr 26, 2023
1 parent 9d86d13 commit 0ec524d
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 3 deletions.
57 changes: 56 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Expand Up @@ -20,7 +20,7 @@
"scripts": {
"start": "react-scripts start",
"serve": "json-server --watch ./src/server/db/index.js --routes ./src/server/routes.json --port 3001",
"build": "react-scripts build && npm run save-json-api",
"build": "react-scripts build && npm run save-json-api && shx cp build/index.html build/404.html",
"save-json-api": "node ./src/server/scripts/save-json-api.js",
"test": "react-scripts test",
"eject": "react-scripts eject",
Expand Down Expand Up @@ -48,6 +48,7 @@
"devDependencies": {
"gh-pages": "^5.0.0",
"json-server": "^0.17.3",
"node-fs": "^0.1.7"
"node-fs": "^0.1.7",
"shx": "^0.3.4"
}
}

0 comments on commit 0ec524d

Please sign in to comment.