Skip to content

chore(build): point tsdown aliases at real src dirs#431

Merged
johnleider merged 1 commit into
masterfrom
worktree-fix+403-tsdown-alias-paths
Jun 30, 2026
Merged

chore(build): point tsdown aliases at real src dirs#431
johnleider merged 1 commit into
masterfrom
worktree-fix+403-tsdown-alias-paths

Conversation

@johnleider

Copy link
Copy Markdown
Member

The bundler-alias path consts in packages/0/tsdown.config.mts and packages/paper/tsdown.config.mts resolved to non-existent directories:

  • packages/0: at = ../srcpackages/src ✗, v0 = ../../0/src0/src
  • packages/paper: v0 = ../../0/src0/src ✗, paper = ../srcpackages/src

The build was green only because the keys never matched real imports (@ is unused; #v0/#paper resolve via package.json imports / tsconfig paths). It's a latent footgun — a future @/… import would resolve to a nonexistent dir and fail confusingly.

Fix: correct the path consts to the real src dirs (matching packages/0/vitest.config.ts and packages/genesis/tsdown.config.mts):

  • packages/0: both at and v0new URL('src', …) (= packages/0/src)
  • packages/paper: v0new URL('../0/src', …) (= packages/0/src), papernew URL('src', …) (= packages/paper/src)

I kept the aliases (corrected) rather than deleting them (the issue's other option): paper genuinely consumes #v0, and a correctly-pointed alias is zero-risk, whereas deletion risks removing something load-bearing. A maintainer can delete them later if confirmed fully unused.

Bug-family: both packages/0 and packages/paper fixed in one pass. Verified locally: pnpm build:0 and pnpm build:paper both complete green.

Closes #403

The @/#v0 (packages/0) and #v0/#paper (packages/paper) tsdown bundler aliases
resolved to non-existent directories (../src → packages/src; ../../0/src →
0/src). The build stayed green only because the keys didn't match real imports —
a latent footgun: a future `@/...` import would resolve to a nonexistent dir and
fail confusingly. Correct the path consts to the real locations (matching
vitest.config.ts and packages/genesis). Kept the aliases (corrected) rather than
deleting them, since paper consumes #v0 and a corrected alias is zero-risk;
maintainer can delete later if confirmed fully unused. Verified: build:0 and
build:paper both green.

Closes #403
#403
@johnleider johnleider added this to the v1.0.0 milestone Jun 30, 2026
@johnleider johnleider added the T: bug Something isn't working label Jun 30, 2026
@johnleider johnleider self-assigned this Jun 30, 2026
@pkg-pr-new

pkg-pr-new Bot commented Jun 30, 2026

Copy link
Copy Markdown

Open in StackBlitz

commit: 72a8f43

@johnleider johnleider merged commit 97baf1c into master Jun 30, 2026
19 checks passed
@johnleider johnleider deleted the worktree-fix+403-tsdown-alias-paths branch June 30, 2026 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T: bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Chore] tsdown config aliases resolve outside packages/0/src (also packages/paper)

1 participant