-
chore(repo): finish migrating builds off the workspace-root dist (#35915)
发布于
2026-06-09 22:01:46 +00:00 Current Behavior
Following the local-dist migration (#35900), several projects were still
writing build or typecheck output to the shared workspace-rootdist/:- Five packages' spec configs —
@nx/angular-rspack,
@nx/angular-rspack-compiler,@nx/dotnet,@nx/maven, andnx—
kept theirtsconfig.spec.jsonoutDirpointing at
dist/packages/<name>/speceven though their lib output had been
migrated to a localdist. tools/workspace-pluginbuilt to the shared
dist/workspace-plugin(its conformance rules are loaded from the built
output).- The graph client bundled to
dist/apps/graphand emitted its
typecheck declarations todist/graph/client; the graph libs wrote
spec/storybook typecheck output underdist/out-tsc. - nx-dev lib/spec tsconfigs pointed their
outDirat
dist/out-tsc/....
Separately, astro-docs documentation generation resolved each plugin's
schema.jsonfrom its builtdist(the migrated
generators.json/executors.jsonrefs point at./dist/src/...).
Reading another project's build output tripped the task sandbox with
undeclareddist/**/schema.jsonreads.Expected Behavior
Each project builds to its own local directory, leaving the
workspace-rootdist/alone:- The five spec configs now emit to local
dist/spec. tools/workspace-pluginbuilds totools/workspace-plugin/dist; the
seven conformance rule paths innx.jsonare updated, and
main/typingsare repointed intodistso the@nx/js/typescript
plugin still infers its build target.- The graph client bundles to
graph/client/dist(thenxpackage's
assets.jsoninput is updated to match); its typecheck output goes to a
localout-tscso the emitted declarations stay out of the copied
bundle dir. Graph lib spec/storybook output moves to localdist. - nx-dev lib/spec outputs move to local
dist/dist/spec
(preventative — these were vestigial as no target runstscon most
nx-dev libs today).
astro-docs now reads plugin
schema.jsonfrom source (the verbatim
copy), which also matchesastro-docs:build's already-declared
packages/*/src/.../schema.jsoninputs — removing the sandbox violation
without weakening cache correctness.Validation:
nx build workspace-plugin+nx conformancepass from the
new path; the graph client builds and copies into
packages/nx/dist/src/core/graphwith no declaration leakage;nx build astro-docsis green (753 pages, no schema-resolution errors); affected
graph and nx-devtypecheck/lint/testpass.Related Issue(s)
Follow-up to #35900 (local-dist build migration). No separate issue.
Co-authored-by: nx-cloud[bot] <71083854+nx-cloud[bot]@users.noreply.github.com>
下载附件
- Five packages' spec configs —