Last 12 weeks · 3 commits
3 of 6 standards met
Summary Changed SPA fallback rewrite rule to avoid matching dot-containing paths, so static assets are not rewritten to index when using . Added regression coverage in server tests for: extensionless route () rewrites to . existing dotted asset () is served directly. missing dotted path () returns 404. Added fixture for the dotted-asset case. Testing
Closes #855. Summary Adds to customize SPA fallback target when is used. Normalizes custom fallback paths so becomes . Keeps default behavior unchanged at . Updates help text and CLI argument parsing/types. Adds a targeted CLI test for parsing the new option. This follows existing rewrite behavior and reuses serve-handler rewrites without schema changes.
Description Currently, there is the following option (mentioned in #664): However, this option is limited and does not support loading custom HTML as mentioned by @woss in: https://github.com/vercel/serve/issues/695#issuecomment-2047172879 Why Frameworks like Tanstack Start generates by default for SPA, rather than : https://github.com/TanStack/router/discussions/3394 https://tanstack.com/start/v0/docs/framework/react/guide/spa-mode#how-does-it-work Alternatives A workaround can be seen here: https://github.com/fuma-nama/fumadocs/pull/3378 Where is created with a rewrite: This isn't ideal, however, since the rewrite works on all paths rather than serving as a fallback, which masks the API route - thus, it needs to be excluded in the source glob. There may also be other exclusions needed apart from .
Description This PR adds a QR code display for both Local and Network URLs when the server starts. Why? Manually typing long local IP addresses on mobile devices for testing is tedious. Scanning a QR code from the terminal makes cross-device testing significantly faster and more convenient. Changes Added as a dependency. Created utility. Updated to render QR codes inside the startup box.
Repository: vercel/serve. Description: Static file serving and directory listing Stars: 9891, Forks: 704. Primary language: TypeScript. Languages: TypeScript (78.7%), HTML (10.5%), JavaScript (10.5%), Shell (0.3%). License: MIT. Homepage: https://npmjs.com/package/serve Topics: cli, command, http, node. Latest release: v14.2.6 (5mo ago). Open PRs: 18, open issues: 132. Last activity: 1mo ago. Community health: 75%. Top contributors: leo, greenkeeper[bot], rauchg, AndyBitz, greenkeeperio-bot, leerob, disquisition, TooTallNate, gamemaker1, dependabot[bot] and others.