vercel / serve

Static file serving and directory listing
https://npmjs.com/package/serve
MIT License
9.43k stars 693 forks source link

react app route problem #810

Open AliElkishawi opened 2 months ago

AliElkishawi commented 2 months ago

when I used the serve to deploy my react app it was worked but when I insert my own route in browser its giving me a blank page " white screen " if go to my.domain.com/first_route ---> its worked but go to my.domain.com/first_route/second_route ---> giving me a blank screen

and thanks alot

JGuillenY commented 5 days ago

Not sure if this was already resolved, but for serving SPAs, you just have to add the -s option. According to the documentation: -s, --single Rewrite all not-found requests toindex.html``

With that flag you shouldn't have issues.