Skip to content

Conversation

@clydin
Copy link
Member

@clydin clydin commented Jan 27, 2026

This commit refactors the sourcemap source adjustment logic within the Vitest plugin into a standalone helper function, adjustSourcemapSources. This improves the readability of the load hook and isolates the logic for verifying and updating sourcemap paths.

…t plugin

This commit refactors the sourcemap source adjustment logic within the Vitest plugin
into a standalone helper function, `adjustSourcemapSources`. This improves the
readability of the `load` hook and isolates the logic for verifying and updating
sourcemap paths.

Additionally, the `map` parameter is now typed using `ExistingRawSourceMap` from
`rolldown` instead of `any`.
@clydin clydin added the target: minor This PR is targeted for the next minor release label Jan 27, 2026
@clydin clydin added the action: review The PR is still awaiting reviews from at least one requested reviewer label Jan 27, 2026
…rove safety

This commit improves the performance of the Vitest plugin by reusing a single
`TextDecoder` instance for decoding memory files, avoiding repeated instantiation.

It also adds safety checks when accessing the resolved Vitest configuration to
prevent potential errors if the configuration is not yet fully initialized.
…itest plugin

This commit removes a redundant code block in the `resolveId` hook of the Vitest
plugin. The logic for resolving relative imports is fully covered by the subsequent
generic path resolution strategy, reducing code duplication and complexity.
@clydin clydin requested a review from alan-agius4 January 28, 2026 13:14
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: minor This PR is targeted for the next minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant