Skip to content

Conversation

@jcbsfilho
Copy link
Collaborator

This pull request migrates the build system for all packages from tsup to vite, updates package exports for better TypeScript support, and refines import and type definitions for consistency and maintainability. The changes improve build performance, simplify configuration, and enhance compatibility with modern tooling.

Build System Migration:

  • Switched the build tool from tsup to vite across all packages, updating the compile script and removing tsup configuration files. Added vite and vite-plugin-dts as dev dependencies in the root package.json. [1] [2] [3] [4] [5] [6] [7] [8] [9]
  • Added new vite.config.mjs files for each package, with custom configuration and aliasing for internal imports. [1] [2] [3] [4]

Export and Type Improvements:

  • Updated package.json exports for all packages to include explicit "types" fields and switched main CommonJS entry points from .js to .cjs, and ESM entry points from .js to .mjs. [1] [2] [3] [4] [5] [6]
  • Adjusted TypeScript type export paths in package.json and fixed references to .d.ts files for consistency. [1] [2]

Internal Import Consistency:

  • Refactored imports in various types.ts files to use import type { ... } for type-only imports, and changed export { ... } to export type { ... } for type exports. [1] [2] [3] [4] [5] [6] [7] [8]
  • Updated client package imports to use aliased paths instead of relative paths, improving modularity and maintainability.

Alias and External Dependency Configuration:

  • Added extensive alias and external dependency configuration to new vite.config.mjs files to ensure correct module resolution and bundling for internal packages. [1] [2] [3]

These changes modernize the build and packaging process, streamline internal development, and improve support for consumers of the packages.

@jcbsfilho jcbsfilho requested a review from a team as a code owner January 26, 2026 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants