Skip to content

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

Description

@johnleider

Summary

The @ and #v0 bundler aliases in packages/0/tsdown.config.mts resolve to non-existent directories. The build is green only because the keys never match real imports — a latent footgun.

Location

  • packages/0/tsdown.config.mts:7-8:
    • new URL('../src', import.meta.url)…/packages/src (does not exist; the real tree is packages/0/src)
    • new URL('../../0/src', import.meta.url)…/0/src (does not exist)
  • Used as alias: { '@': at, '#v0': v0 } (:27-30, :56-59).
  • The build works because @ is unused in source and #v0/... resolves via the package.json imports field, so the alias never wins. If a @/... import were added, it would resolve to the nonexistent packages/src and fail confusingly.
  • Correct precedent: packages/0/vitest.config.ts:9,13 and packages/genesis/tsdown.config.mts:7 (single ../0/src).
  • Same defect in packages/paper/tsdown.config.mts:8-9.

Suggested fix

Delete the at / v0 consts and both alias blocks (@ is unused; #v0 already resolves via package.json imports + tsconfig paths — the build is proven to work without them). If keeping the aliases, correct them to new URL('src', import.meta.url). Fix packages/paper in the same pass (bug-family).

Metadata

Metadata

Assignees

Labels

T: bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions