react-starter
react-starter copied to clipboard
Static Build
Hi, I was wondering if it is possible to generate a static build using this starter package? For production, I'd quite like to just plonk a folder into an nginx server, rather than having express running the application. Is that possible?
Thanks, Chris
Propably... You could disable prerendering and use a static html page. react-router need to be switched to hash based mode.
You would loose some benefits like prerendering and pretty urls, but I think it is possible.
Possible, but a crying shame.
if you are using nginx you can use something like this to keep your pretty urls and push state router
location / {
try_files $uri /index.html;
}
https://github.com/webpack/react-starter/pull/82 gives this capability, you'd have to make react router hash based in the code though
@chrismcv - could you test this? https://github.com/webpack/react-starter/pull/82