Describe the problem
Windows path handling has produced roughly 30 one-line fix PRs since 2020, nearly all one of two shapes: a missing pathToFileURL before a dynamic import (#399, #425, #13495, #16618) or a missing posixify where a Node path meets a Vite-normalized id (#1096, #5739, #13671, #14993, #15977, #16367, among ~19). exports/vite/index.js alone has been fixed six times (#5739, #15121, #15895, #16037, #16294, #16545). These keep landing because CI can't see them: windows-latest only covers the cross-platform kit subset and adapter-node's basic app, so adapter-auto, netlify, vercel, cloudflare, static and svelte-package have no Windows coverage at all.
Describe the proposed solution
Two guards. An eslint rule in the style of no-runtime-to-exports-imports that flags a dynamic import() of a computed path not wrapped in pathToFileURL, and windows-latest legs for the uncovered packages, even if only their unit suites. I'll PR the lint rule if there's appetite.
Alternatives considered
Keep fixing them individually. A posix-everywhere path convention would address the root cause of the posixify class but is a refactor, not a guard.
Importance
nice to have
Describe the problem
Windows path handling has produced roughly 30 one-line fix PRs since 2020, nearly all one of two shapes: a missing
pathToFileURLbefore a dynamic import (#399, #425, #13495, #16618) or a missingposixifywhere a Node path meets a Vite-normalized id (#1096, #5739, #13671, #14993, #15977, #16367, among ~19).exports/vite/index.jsalone has been fixed six times (#5739, #15121, #15895, #16037, #16294, #16545). These keep landing because CI can't see them: windows-latest only covers the cross-platform kit subset and adapter-node's basic app, so adapter-auto, netlify, vercel, cloudflare, static and svelte-package have no Windows coverage at all.Describe the proposed solution
Two guards. An eslint rule in the style of
no-runtime-to-exports-importsthat flags a dynamicimport()of a computed path not wrapped inpathToFileURL, and windows-latest legs for the uncovered packages, even if only their unit suites. I'll PR the lint rule if there's appetite.Alternatives considered
Keep fixing them individually. A posix-everywhere path convention would address the root cause of the
posixifyclass but is a refactor, not a guard.Importance
nice to have