Skip to content

tsup build + subpath exports + publish config #28

@qantrepreneur

Description

@qantrepreneur

What to build

Set up the build and publish pipeline for @sundayceo/framework. The package uses tsup to compile TypeScript to ESM and generate declaration files, with subpath exports for the main entry and the Vite plugin.

Configure:

  • tsup.config.ts with two entry points: src/core/index.ts and src/vite/index.ts
  • ESM output only (no CJS — modern Node/Vite ecosystem)
  • Declaration file generation (.d.ts)
  • package.json exports map:
    • "." → core runtime
    • "./vite" → Vite plugin
  • peerDependencies for react, react-dom, vite
  • files field to control what gets published
  • Verify the built package works: import from both entry points in a test consumer

Acceptance criteria

  • tsup.config.ts builds both entry points
  • ESM output with .d.ts declaration files
  • package.json has correct exports map for . and ./vite
  • peerDependencies declared for react, react-dom, vite
  • files field excludes tests, playground, configs
  • pnpm run build in packages/framework succeeds
  • Built output is importable from both subpaths
  • npm pack --dry-run shows correct file list

Blocked by

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    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