You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running a specific target (e.g., nx build my-app), Nx builds the entire project graph including running all plugin inference logic, even when the target is explicitly defined in the project's project.json.
This causes significant performance issues in large monorepos. In our case, the Jest plugin inference causes timeouts during Docker builds when we only need to run a build target that is already explicitly configured.
Expected Behavior
The logic should be:
Check if the target exists explicitly in project.json
If yes → execute it directly without full plugin inference
If no → use only the relevant plugin to infer the target for that specific project
Workaround
We currently have to remove the plugins section from nx.json during Docker builds to avoid timeouts:
This discussion was converted from issue #34030 on January 06, 2026 22:50.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Current Behavior
When running a specific target (e.g.,
nx build my-app), Nx builds the entire project graph including running all plugin inference logic, even when the target is explicitly defined in the project'sproject.json.This causes significant performance issues in large monorepos. In our case, the Jest plugin inference causes timeouts during Docker builds when we only need to run a build target that is already explicitly configured.
Expected Behavior
The logic should be:
project.jsonWorkaround
We currently have to remove the
pluginssection fromnx.jsonduring Docker builds to avoid timeouts:This feels like a hack and shouldn't be necessary.
Why This Matters
Proposal
Consider implementing lazy/on-demand plugin inference:
--skip-inferencefor commands targeting explicit targetsEnvironment
@nx/jest/plugin(but applies to all inference plugins)Would love to hear the team's thoughts on this optimization!
Beta Was this translation helpful? Give feedback.
All reactions