Files
graphify/tests
berce f97677d5d1 fix(js): fall back to src/ when a workspace package's exports name only dist/ (#4485)
#3834 let a workspace import whose `main`/`types` point into dist/ fall
through to `src/index`, but an `exports` map returned its own candidates
and never reached that fallback. A tsc-built package with
`"exports": {".": {"import": "./dist/index.js"}}` therefore resolved to
dist/ (outside the corpus, so an external stub) when it was built, and to
nothing on a clean clone.

Append each build-output exports target's source twin (dist/sub.js ->
src/sub) and, for the root entry, src/index and index. They come after the
exports targets, and _resolve_workspace_import already prefers a file
outside build output, so source wins when it exists and dist/ stays the
fallback.

(cherry picked from commit 705abe6c4c)
2026-10-16 17:10:31 +01:00
..