You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I am using create-react-app to generate my build folder for my SPA and I want to serve a single, standalone html file called health.html that is also in the public folder, like so:
A request to localhost:3000/health should serve health.html, and any other requests should serve index.html. For some reason I cannot get this to work at all. From the docs, the following contents of serve.json seems like it is correct, but all requests to /health still redirect to index.html.
I am having a similar issue. I have the serve.json in dist folder and serving it and my rewrite rules do not seem to work. did you find a solution @Matthematic ?
I am having a similar issue. I have the serve.json in dist folder and serving it and my rewrite rules do not seem to work. did you find a solution @Matthematic ?
This was nearly a year ago and the contract for that job was fulfilled so I no longer have access to the code, but from memory I believe I switched the project over to vite instead of create-react-app since the latter is no longer maintained. This can be done easily with vite plugins.
Hello, I am using create-react-app to generate my build folder for my SPA and I want to serve a single, standalone html file called health.html that is also in the public folder, like so:
A request to localhost:3000/health should serve health.html, and any other requests should serve index.html. For some reason I cannot get this to work at all. From the docs, the following contents of serve.json seems like it is correct, but all requests to /health still redirect to index.html.
For reference, I am using this command:
What am I doing wrong?
The text was updated successfully, but these errors were encountered: