editor-ui resolves 14 workspace packages from source, and that fact is
currently stated twice — a Vite alias table and a tsconfig `paths` map —
held together by an equivalence test. A reviewer on #35642 objected to
the shape rather than the implementation: two artifacts kept in sync is a
smell, and the test is a symptom rather than a cure. That principle is
right, and the answer it points at is larger than the PR under review,
so it goes to an RFC instead of a PR comment.
The RFC steelmans three options — keeping the landed hand-maintained
lists, `vite-tsconfig-paths` as the reviewer suggested, and moving
resolution truth into each package's own `package.json` (source-only
frontend packages plus an `n8n:source` export condition on the shared
frontend/backend ones) — costs the three named risks, maps the blast
radius across 12 packages and 15 resolution contexts, and recommends
one option with the strongest case against it attached.
The central mechanism is verified against this repo's pinned toolchain
with negative controls: `customConditions` is honoured by both
TypeScript catalogs (6.0.2 and 7.0.2) under `moduleResolution: bundler`,
and `resolve.conditions` by Vite 8.0.2/rolldown. Two findings correct
the design as briefed: source-only alone does not serve the 2,039 deep
imports into these packages, and subpath patterns must append the file
extension or resolution silently falls back to dist.
This RFC decides nothing and implements nothing. No package is migrated
and no dist build is deleted.
Related: https://github.com/n8n-io/n8n/pull/35642
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>