Skip to content

Docs: serve static builds with serve.json (clean URLs, trailing slash, rewrites) #52

Closed

Description

@tmashara

What
Document how to serve a static build so its URLs behave like the real host: serve.json with cleanUrls, trailingSlash, rewrites and redirects for npx serve, in skills/renderdiff/reference.md and the README's migration section.

Why
From the metabase.com run (feedback.md, item 2): the agent wrote its own serve.ts to map slashless URLs to .html, redirect index paths to the trailing-slash form, and fall back from docs to the marketing dist. serve (via serve-handler) already does all of that from a config file; we just don't say so. A built-in --serve <dir> would duplicate it, so we skip that.

How
A short example serve.json that matches Vercel's and Amplify's defaults, and one line on how to serve two dists under one origin with rewrites.

Activity

  1. added
    documentation
    on Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions