Closed ShrimpCryptid closed 4 months ago
See https://via.studio/journal/hosting-a-reactjs-app-with-routing-on-aws-s3 and the discussion on Simularium here: https://github.com/simularium/simularium-website/issues/498. Will need infra support for this.
Similar approach that can be used on GitHub pages, capturing + redirecting 404 errors: https://github.com/rafgraph/spa-github-pages
Use Case
Upcoming PR #212 sets all "production mode" builds to use hash router instead of browser router.
Solution
Configure S3 to correctly route to the base
index.html
, and then modify the logic inindex.tsx
so it usescreateBrowserRouter
instead ofcreateHashRouter
.Alternatives
Please describe any alternatives you've considered, even if you've dismissed them