Deploying React apps with Amplify
AWS Amplify can easily deploy frontend apps with CI/CD. Here are the setting I use for the Rewrites and redirects setting, similar to having the backend return the index.html when navigating pages (history fallback):
- Source: </^((?!\.(css|gif|ico|jpg|js|png|txt|svg|woff|ttf)$).)*$/>- Target: /index.html- Type: 200
Hope this will save you some time.
If you have ejected the react-react-app (with typescript in my case), be sure to set the baseDirectory to “build” so Amplify can serve the index.html in the correct folder.