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
2 is being ignored, localhost:5000/subdir and localhost:5000/subdir/index.html give 404 or redirect to root (don't remember which one).
With server build:
1 work as expected. localhost:5000
2 work as expected. localhost:5000/subdir
I would have expected localhost:5000/subdir with serve -s build to server build/subdir/index.html, and not build/index.html (or 404) (I think it was redirect).
--help show description:
-s, --single Rewrite all not-found requests to `index.html`
But current behavior seem to be "rewrite all requests to /index.html".
The text was updated successfully, but these errors were encountered:
Also had this issue, it seems serve-handler by default redirect /build/subdir/index.html to /build/subdir, which is called 'cleanUrls'
The temporary solution is to disable 'cleanUrls' by adding a serve.json:
@buhichan where do I place the serve.json.
Am using serve to serve dist and the serve.json doesn't seem to work. The doc says to place the serve.json in public folder but am a bit confused about the placement. Any pointers will help, thanks!
Files:
build/index.html
build/subdir/index.html
With
serve -s build
:localhost:5000
localhost:5000/subdir
andlocalhost:5000/subdir/index.html
give 404 or redirect to root (don't remember which one).With
server build
:localhost:5000
localhost:5000/subdir
I would have expected
localhost:5000/subdir
withserve -s build
to serverbuild/subdir/index.html
, and notbuild/index.html
(or 404) (I think it was redirect).--help
show description:But current behavior seem to be "rewrite all requests to /index.html".
The text was updated successfully, but these errors were encountered: