Skip to content

fix: respect resolve.preserveSymlinks when resolving root (fix #23197) - #23198

Open
lazerg wants to merge 1 commit into
vitejs:mainfrom
lazerg:fix/issue-23197-preserve-symlinks-root
Open

fix: respect resolve.preserveSymlinks when resolving root (fix #23197)#23198
lazerg wants to merge 1 commit into
vitejs:mainfrom
lazerg:fix/issue-23197-preserve-symlinks-root

Conversation

@lazerg

@lazerg lazerg commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

#22832 made resolveConfig always resolve root through realpath, which ignores resolve.preserveSymlinks. On Windows a project reached through a junction can end up with a root on a different drive letter than the one the rest of the tooling works with, so files that used to sit under root no longer do and fail to resolve.

This skips the realpath step when resolve.preserveSymlinks is set, restoring the 8.1.5 behavior for that case while keeping #22832 for everyone else.

fixes #23197

@lazerg
lazerg force-pushed the fix/issue-23197-preserve-symlinks-root branch from b24bb37 to 28599f8 Compare August 8, 2026 00:12
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.

Regression in 8.2: Vitest setupFiles fails with "Cannot find module" across Windows drive symlinks

1 participant