Skip to content

fix(vite): fix the build command for the deps in the vite tsconfig paths plugin #31729

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

Merged
merged 1 commit into from
Jun 25, 2025

Conversation

leosvelperez
Copy link
Member

Current Behavior

The nxViteTsPaths plugin determines the buildable libraries by checking the existence of the following target:

process.env.NX_TASK_TARGET_TARGET === 'serve'
  ? 'build'
  : process.env.NX_TASK_TARGET_TARGET

But it later creates the command to build the dependencies to always run the process.env.NX_TASK_TARGET_TARGET target. This is wrong and results in trying to run the serve task for the dependencies when the root task is serve.

Expected Behavior

The nxViteTsPaths plugin should use the same task name to determine the buildable libraries and run the command to build the dependencies.

Related Issue(s)

Fixes #31333

@leosvelperez leosvelperez requested a review from Coly010 June 25, 2025 13:42
@leosvelperez leosvelperez self-assigned this Jun 25, 2025
@leosvelperez leosvelperez requested a review from a team as a code owner June 25, 2025 13:42
Copy link

vercel bot commented Jun 25, 2025

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

Name Status Preview Updated (UTC)
nx-dev ✅ Ready (Inspect) Visit Preview Jun 25, 2025 1:49pm

Copy link
Contributor

nx-cloud bot commented Jun 25, 2025

View your CI Pipeline Execution ↗ for commit 7ae85b3.

Command Status Duration Result
nx affected --targets=lint,test,build,e2e,e2e-c... ✅ Succeeded 33m 8s View ↗
nx run-many -t check-imports check-commit check... ✅ Succeeded 17s View ↗
nx-cloud record -- nx-cloud conformance:check ✅ Succeeded 2s View ↗
nx-cloud record -- nx format:check ✅ Succeeded 4s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded 4s View ↗
nx documentation ✅ Succeeded 30s View ↗

☁️ Nx Cloud last updated this comment at 2025-06-25 14:39:16 UTC

@leosvelperez leosvelperez merged commit 08b8e71 into master Jun 25, 2025
8 checks passed
@leosvelperez leosvelperez deleted the vite/fix-tsconfig-paths-plugin branch June 25, 2025 14:58
Copy link

github-actions bot commented Jul 1, 2025

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 Jul 1, 2025
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.

NxTsConfigPaths - buildLibsFromSource incorrect build command
2 participants