-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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): handle both vite.config.ts and vitest.config.ts #22521
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
☁️ Nx Cloud ReportCI is running/has finished running commands for commit fd8c1c8. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution ✅ Successfully ran 6 targets
Sent with 💌 from NxCloud. |
For the record, the build was green before I rebased 😉 |
@AgentEnder since you recently worked on plugin configuration, maybe you could take a look at this PR? |
Closed in favour of: #22618 |
Hey @MaximeBernard! Sorry, I should have elaborated more and I also should have said this: Thanks for the PR to attempt to fix this! 🎉 There are two things really. 1. The issue was less about how the targets are created. The real issue was not about the conditional on the config file name. It was because both config files were generating the same hash as the parameters were the same, which led to one or the other of the config files overwriting the cache for the targets. Which config file did this was dictated by that conditional. Changing it only changed which config file overwrote the cache last. 2. Code style
So when it comes to reading it, you get an overall picture of what happens when the config file is or is not Perhaps your suggestion would be more clear, but it's just semantics at that stage. All this said, thank you again for taking a stab at this! Your suggestion in this PR helped me to identify the root cause of the issue more swiftly! |
Thank you so much for this answer ❤️ Agree with you it's more about semantic at this point. In my case, I had 3 scenarios
When I investigated, this seemed awkward because I didn't expect 2 "runs" (1 on each file). Thank you for the clarification, have a great day 🚀 |
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. |
Current Behavior
When a package has both
vite.config.ts
andvitest.config.ts
, plugin fails to infer targets correctly (in my case, I had some packages withtest
targets, some withbuild
targets).Expected Behavior
Having both files should not bother nx plugin.
Related Issue(s)
Might fix #22244