Upstream issue draft — for Rob's word before filing (external publish)
Target: vinext repository (npm package vinext; repo URL per its package.json/npm page)
Verified present in: 0.0.50 and 1.0.0-beta.3 (latest at time of writing, 2026-07-24)
Title: Windows: production server 404s every nested static asset — StaticFileCache keys built with backslashes
Body:
On Windows, vinext start (production server) returns the router's NOT_FOUND for every static file in a subdirectory of dist/client/ — including all hashed /assets/* JS/CSS — while SSR routes work fine. The page loads as unstyled HTML with a failed dynamic import.
Cause: src/server/static-file-cache.ts (walkFilesWithStats) yields relativePath: path.relative(base, file). On Windows path.relative returns backslash-separated paths, so cache keys become /assets\index-XXXX.js while request lookups use URL pathnames (/assets/index-XXXX.js). Every nested file misses. Because a provided StaticFileCache has no filesystem fallback in tryServeStatic (a miss returns false immediately), the request falls through to routing and 404s. The .vite/ exclusion and assets/-prefix immutable-caching checks silently misbehave for the same reason (startsWith("assets/") never matches assets\...).
Repro (Windows):
npx vinext build
npx vinext start --port 3000
# open the site: every /assets/* request → 404 JSON {"state":"NOT_FOUND"}
Fix (one line):
- relativePath: path.relative(base, batch[j]),
+ relativePath: path.relative(base, batch[j]).split(path.sep).join("/"),
Verified locally on Windows 11 / Node 24: all nested lookups resolve, .vite/ exclusion and hashed-asset cache headers behave correctly, page loads with zero console errors.
Present in 0.0.50 through 1.0.0-beta.3 (the beta's walkFilesWithStats is identical in this respect).
BOUNDARY: NOT FILED. Filing is an external publish under RIG001 law — Rob's word required. On word: file via gh or web, record issue URL on the rail.
Upstream issue draft — for Rob's word before filing (external publish)
Target: vinext repository (npm package
vinext; repo URL per its package.json/npm page)Verified present in: 0.0.50 and 1.0.0-beta.3 (latest at time of writing, 2026-07-24)
Title: Windows: production server 404s every nested static asset — StaticFileCache keys built with backslashes
Body:
On Windows,
vinext start(production server) returns the router's NOT_FOUND for every static file in a subdirectory ofdist/client/— including all hashed/assets/*JS/CSS — while SSR routes work fine. The page loads as unstyled HTML with a failed dynamic import.Cause:
src/server/static-file-cache.ts(walkFilesWithStats) yieldsrelativePath: path.relative(base, file). On Windowspath.relativereturns backslash-separated paths, so cache keys become/assets\index-XXXX.jswhile request lookups use URL pathnames (/assets/index-XXXX.js). Every nested file misses. Because a providedStaticFileCachehas no filesystem fallback intryServeStatic(a miss returnsfalseimmediately), the request falls through to routing and 404s. The.vite/exclusion andassets/-prefix immutable-caching checks silently misbehave for the same reason (startsWith("assets/")never matchesassets\...).Repro (Windows):
Fix (one line):
Verified locally on Windows 11 / Node 24: all nested lookups resolve,
.vite/exclusion and hashed-asset cache headers behave correctly, page loads with zero console errors.Present in 0.0.50 through 1.0.0-beta.3 (the beta's
walkFilesWithStatsis identical in this respect).BOUNDARY: NOT FILED. Filing is an external publish under RIG001 law — Rob's word required. On word: file via gh or web, record issue URL on the rail.