Skip to content

Package ships raw TS source (no build, no .d.ts) — breaks tsc in consumers #15

Description

@A-PachecoT

Problem

@cofoundy/ui package.json points at raw source with no compiled output:

  • main: ./src/index.ts
  • exports["."]: ./src/index.ts
  • types: absent
  • no build script

So any consumer that runs tsc against an import from @cofoundy/ui descends into the entire ui source tree and surfaces its internal/pre-existing type errors (collapsible / email / transports), breaking the consumer's build. Vite/runtime bundles fine, but typecheck fails.

Impact (observed)

products/forms (Vite + React, no Tailwind) importing LogoHeadertsc -b broke. Workaround was a local type-shim (src/types/cofoundy-ui.d.ts + tsconfig paths) — runtime uses the real package, but it's friction every consumer outside the Next/Tailwind setup will re-hit.

Proposed fix

  • Add a build step (tsup/vite-lib/tsc) emitting dist/ + .d.ts.
  • package.json: main/moduledist/, typesdist/index.d.ts, exports["."] with import/types conditions.
  • Resolve the pre-existing type errors in collapsible/email/transports as part of it.
  • Keep subpath exports (@cofoundy/ui/hero-shader, /styles) building too.

Context

Surfaced during forms Typeform redesign (T-017), 2026-05-29. Local shim is the interim; this is the upstream fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions