lint compiler's validateKey
function fails on vite dev servers running on windows
#1150
Open
1 task done
Labels
What version of
million
are you using?1.0.12
Are you using an SSR adapter? If so, which one?
None
What package manager are you using?
npm
What operating system are you using?
Windows
What browser are you using?
Chrome
Describe the Bug
I can't find the source code here, but
node_modules\@million\lint\dist\compiler\index.mjs
line 2032 has this logic:On Windows, the
filename
includes\\
characters, so thevalidateKey
function always fails, causing the.vite
cache to be cleared and then crashing the Vite dev server because the "cache has been corrupted".For better compatibility I think you should remove the hard-coded
"/"
and instead usepath.sep
:After making that change locally, everything works as expected.
NOTE: The stackblitz link doesn't show the error because it fails before that point on some connection issue.
What's the expected result?
I would expect Vite dev server's cache not to be cleared while running.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/vitejs-vite-5iaffw?file=vite.config.ts
Participation
The text was updated successfully, but these errors were encountered: