stereobooster / react-snap

👻 Zero-configuration framework-agnostic static prerendering for SPAs
MIT License
5.06k stars 394 forks source link

Being able to configure server-side routes for the internal express set-up #408

Open cs224 opened 5 years ago

cs224 commented 5 years ago

Feature Request

Is your feature request related to a problem? Please describe. I am writing a react app that has several entry points. I am using client side routing via react-router. In order to make pre-rendering work I have to adapt the server-side routing.

I've done that already via react-app-rewired for the dev set-up.

What I am missing is a way to configure the integrated react-snap express set-up via custom routes.

My current workaround is to use : "externalServer" : true But this is not ideal.

Describe the solution you'd like Add configuration options for server side routing. As an example it might be similar to firebase: https://firebase.google.com/docs/hosting/full-config#rewrites Any other way will do aswell.