Skip to content

fix(@angular/build): correctly resolve absolute setup file paths in Vitest#32442

Open
clydin wants to merge 1 commit intoangular:mainfrom
clydin:vitest/setup-file-resolve
Open

fix(@angular/build): correctly resolve absolute setup file paths in Vitest#32442
clydin wants to merge 1 commit intoangular:mainfrom
clydin:vitest/setup-file-resolve

Conversation

@clydin
Copy link
Member

@clydin clydin commented Feb 5, 2026

The resolveId hook in the Vitest runner plugins now correctly handles absolute paths. Previously, the logic would blindly join the base directory with the file ID, which caused issues when the ID was already a fully qualified absolute path within the workspace. The updated logic now checks if the ID is absolute and located within the base directory before deciding whether to join paths, ensuring compatibility with both absolute paths and Vitest's short-form root-relative paths.

…itest

The `resolveId` hook in the Vitest runner plugins now correctly handles absolute paths. Previously, the logic would blindly join the base directory with the file ID, which caused issues when the ID was already a fully qualified absolute path within the workspace. The updated logic now checks if the ID is absolute and located within the base directory before deciding whether to join paths, ensuring compatibility with both absolute paths and Vitest's short-form root-relative paths.
@clydin clydin marked this pull request as ready for review February 5, 2026 16:58
@clydin clydin added target: patch This PR is targeted for the next patch release action: review The PR is still awaiting reviews from at least one requested reviewer labels Feb 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: review The PR is still awaiting reviews from at least one requested reviewer area: @angular/build target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant