Skip to content

Routing broken when serving statically built SPA sites with elide serve #1806

@franklinfollis

Description

@franklinfollis

Summary

Direct navigation to SPA routes returns 404 when serving a built React app with elide serve, even when the route should exist.

Steps to reproduce

  1. Build a React app with client-side routing (e.g., React Router/Tanstack Router)
  2. Serve the static files: elide serve ./dist
  3. Paste a URL going to an existing route (like http://localhost:8080/my/route)
  4. See 404 in browser console

Loading the root path (http://localhost:8080/) and navigating through to different routes from there works fine.

Metadata

Metadata

Labels

bugSomething isn't workingmodule:serverModules, changes, and issues relating to Elide for servers

Type

Projects

Status

No status

Relationships

None yet

Development

No branches or pull requests

Issue actions