New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
create-react-app serve 200.html #447
Comments
This will serve 200.html even for 404 errors though, so the It will alos You probably want something like |
I was thinking about this more, and directly serving the files via Nginx isn't optimal at the moment, as it's tricky to configure HTTP/2 push correctly using the location = / {
http2_push /static/js/main.xxxxxxx.chunk.js;
http2_push /static/js/1.xxxxxxx.chunk.js;
}
location = /about/ {
http2_push /static/js/main.xxxxxxx.chunk.js;
http2_push /static/js/2.xxxxxxx.chunk.js;
} but in the end, for my particular use case I just made my backend server (using ASP.NET Core) handle it as that was the easiest approach. |
Feature Request
Is your feature request related to a problem? Please describe.
Related to #117 - not a problem, just more clarification on how to serve 200.html in the readme to prevent index.html flashing.
Describe the solution you'd like
A section dedicated to common static services and how to properly configure them.
Describe alternatives you've considered
Leaving the readme as-is
Teachability, Documentation, Adoption, Migration Strategy
Describe a couple of use-cases for serving static sites with react-snap and redirecting to 200.html
Specifically, describe a few configurations for Nginx and the recommended
serve -s build
from create-react-app.For Nginx, this is a simple configuration change:
For create-react-app's suggestion to use
serve -s build
:serve.json
file containing the following:serve
script inpackage.json
to be:The text was updated successfully, but these errors were encountered: