When I run the app using yarn start the frontend behaves fine, but when I use yarn build and use the output in the build directory, it doesn't work.
Steps to reproduce:
install node modules yarn or npm i
yarn build or npm run build
Take that output and use a simple web server to display the contents.
Click on the "Get started" button and follow the flow through NEAR Wallet. It will eventually redirect back to the dApp but we see a 404.
While this could be a web server issue, I believe we might have something wrong with our routing.
I think we might be able to fix this by taking a closer look at the routes, in particular redirectFromWallet and seeing if we can fix it on the React side. Also, please don't feel limited to attempt to a solution beyond this if you have a good instinct.
When I run the app using
yarn start
the frontend behaves fine, but when I useyarn build
and use the output in thebuild
directory, it doesn't work.Steps to reproduce:
yarn
ornpm i
yarn build
ornpm run build
While this could be a web server issue, I believe we might have something wrong with our routing. I think we might be able to fix this by taking a closer look at the routes, in particular
redirectFromWallet
and seeing if we can fix it on the React side. Also, please don't feel limited to attempt to a solution beyond this if you have a good instinct.