Skip to content

fix(main): avoid rewriting dotted paths in --single mode fixes #576#858

Open
ahfoysal wants to merge 2 commits into
vercel:mainfrom
ahfoysal:fix/single-no-dot-rewrite
Open

fix(main): avoid rewriting dotted paths in --single mode fixes #576#858
ahfoysal wants to merge 2 commits into
vercel:mainfrom
ahfoysal:fix/single-no-dot-rewrite

Conversation

@ahfoysal

@ahfoysal ahfoysal commented Jul 7, 2026

Copy link
Copy Markdown

Summary

  • Changed SPA fallback rewrite rule to avoid matching dot-containing paths, so static assets are not rewritten to index when using --single.
  • Added regression coverage in server tests for:
    • extensionless route (/users/settings) rewrites to index.html.
    • existing dotted asset (/bundle.js) is served directly.
    • missing dotted path (/does-not-exist.js) returns 404.
  • Added fixture tests/__fixtures__/server/app/bundle.js for the dotted-asset case.

Testing

  • CI=true pnpm lint:style
  • CI=true pnpm lint:code
  • CI=true pnpm test:tsc
  • CI=true pnpm test:unit -- tests/server.test.ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant