Skip to content

fix: correct the return value of parseReadablePath on Windows#75

Merged
antfu merged 2 commits into
vitejs:mainfrom
liangmiQwQ:fix/correct-readablepath-for-windows
Aug 12, 2025
Merged

fix: correct the return value of parseReadablePath on Windows#75
antfu merged 2 commits into
vitejs:mainfrom
liangmiQwQ:fix/correct-readablepath-for-windows

Conversation

@liangmiQwQ
Copy link
Copy Markdown
Contributor

Problem

parseReadablePath function in app/utils/filepath.ts will check if the path match regex /^\w+:/ in order to match the path like rolldown:*

However, the Windows' path will also match the regex, I think it may be unexpected. The node_modules filters(in TODO #12 ) feat won't work with it in the future because of the wrong module name

Fixes

Added a regex for Windows' path

One more thing: If it really is a bug, I will make a test file for it

@antfu antfu merged commit 09d11c1 into vitejs:main Aug 12, 2025
4 checks passed
liangmiQwQ added a commit to liangmiQwQ/vite-devtools that referenced this pull request Aug 12, 2025
@liangmiQwQ liangmiQwQ deleted the fix/correct-readablepath-for-windows branch October 1, 2025 10:48
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.

2 participants