Skip to content

Tsconfig Build speedup#628

Draft
mxfh wants to merge 1 commit intodevfrom
dx/fix-nx-build-setup
Draft

Tsconfig Build speedup#628
mxfh wants to merge 1 commit intodevfrom
dx/fix-nx-build-setup

Conversation

@mxfh
Copy link
Copy Markdown
Contributor

@mxfh mxfh commented Apr 22, 2026

should reduce cross-project source typechecking by switching selected targets to package-mode builds.

easy win for build times, but the annotations spike changed a few details of the approach.

new findings from the annotations spike

  • buildLibsFromSource: false is still the right switch for stopping cross-library source typechecks.
  • the global Nx default in nx.json (targetDefaults.build.dependsOn: ["^build"] and targetDefaults["@nx/vite:build"].dependsOn: ["^build"]) still forces transitive dependency builds. if a target should really build itself only, it must override that with dependsOn: [].
  • nested alias imports such as @carma-commons/utils/* are the main friction point. Nx rewrites those nested paths to exact extensionless dist targets, so tsconfig aliases alone are not enough. the built package surface has to match that shape.
  • temporary package-surface fixes can unblock this before full cleanup. for the annotations work, commons/utils needed secondary entrypoint outputs for promise, window, number-format, and fetching, and cesium-legacy needed a declaration-surface fix so its built API matches its source barrel.
  • that means issue #625 is still valid backlog, but it is no longer a hard prerequisite for making the annotations packages build in package mode.
  • with dependsOn: [], changed dependencies are not rebuilt automatically. that is intentional for isolated library builds, but app/playground targets either need fresh dependency outputs or they should keep dependency orchestration.

verified in the annotations spike

  • nx run annotations-core:build
  • nx run annotations-runtime:build
  • nx run annotations-builtin-tools:build
  • nx run annotations:build:production after rebuilding touched dependency outputs

external prerequisites / follow-ups

  • remove @carma/math alias as part of #588
  • normalize @carma-commons/utils/* nesting via #625 as follow-up cleanup, not a hard blocker for annotations package-mode builds
  • fix mapping-layers boundary / break utils cycle via #624
  • fix collab imports via #626
  • optionally remove Jest and standardize on Vitest via #627

@mxfh mxfh force-pushed the dx/fix-nx-build-setup branch from c227dbf to 69543f0 Compare April 22, 2026 10:49
@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented Apr 22, 2026

View your CI Pipeline Execution ↗ for commit 69543f0


☁️ Nx Cloud last updated this comment at 2026-04-22 10:53:55 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant