Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(vite): load the correct config file from @nx/vite:test executor #27514

Merged
merged 1 commit into from
Aug 19, 2024

Conversation

jaysoo
Copy link
Member

@jaysoo jaysoo commented Aug 19, 2024

This PR ensures that we pass Vite config file to the programmatic startTest API from Vitest. It fixes the issue with plugins not loading as well as other issues with the config file not being used.

This mainly affects a custom configFile option being passed to the executor. The previous fix to additionally load in plugins via overrides is causing plugins to load twice when the Vite config file is picked up by Vitest (e.g. #27500).

Current Behavior

Expected Behavior

Related Issue(s)

Fixes #27500, #22001

@jaysoo jaysoo requested review from a team as code owners August 19, 2024 16:35
@jaysoo jaysoo requested a review from mandarini August 19, 2024 16:35
Copy link

vercel bot commented Aug 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
nx-dev ✅ Ready (Inspect) Visit Preview Aug 19, 2024 4:48pm

@jaysoo jaysoo merged commit 402bae2 into master Aug 19, 2024
6 checks passed
@jaysoo jaysoo deleted the fix/vitest-executor branch August 19, 2024 18:08
FrozenPandaz pushed a commit that referenced this pull request Aug 21, 2024
…27514)

This PR ensures that we pass Vite config file to the programmatic
`startTest` API from Vitest. It fixes the issue with plugins not loading
as well as other issues with the config file not being used.

This mainly affects a custom `configFile` option being passed to the
executor. The previous fix to additionally load in `plugins` via
overrides is causing plugins to load twice when the Vite config file is
picked up by Vitest (e.g. #27500).

## Current Behavior
<!-- This is the behavior we have today -->

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #27500, #22001

(cherry picked from commit 402bae2)
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Vitest Failures after updating to 19.5.4 when using @nx/vite:test executor
2 participants