Skip to content

Build pipeline runs both tsup and Vite, causing redundant outputs #5

Description

@gupta-8

Enhancement

Problem

The build script runs both:

  • tsup (JS bundles + DTS)
  • vite build in library mode

This can generate duplicate or unclear build artifacts.

Impact

  • Larger and potentially confusing dist/ output.
  • Harder to maintain and reason about published bundles.
  • Risk of mismatched entrypoints over time.

Location

  • package.jsonscripts.build
  • tsup.config.ts
  • vite.config.ts

Suggested Improvement

Pick a single build strategy:

Option A

  • Use tsup for JS + type declarations.
  • Copy CSS assets manually.
  • Remove vite build from the library build step.

Option B

  • Use Vite library mode exclusively.
  • Ensure it outputs both ESM and CJS if required.
  • Align exports with Vite’s output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions