feat: migrate build system from tsup to vite #354
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request migrates the build system for all packages from
tsuptovite, 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:
tsuptoviteacross all packages, updating thecompilescript and removingtsupconfiguration files. Addedviteandvite-plugin-dtsas dev dependencies in the rootpackage.json. [1] [2] [3] [4] [5] [6] [7] [8] [9]vite.config.mjsfiles for each package, with custom configuration and aliasing for internal imports. [1] [2] [3] [4]Export and Type Improvements:
package.jsonexports for all packages to include explicit"types"fields and switched main CommonJS entry points from.jsto.cjs, and ESM entry points from.jsto.mjs. [1] [2] [3] [4] [5] [6]package.jsonand fixed references to.d.tsfiles for consistency. [1] [2]Internal Import Consistency:
types.tsfiles to useimport type { ... }for type-only imports, and changedexport { ... }toexport type { ... }for type exports. [1] [2] [3] [4] [5] [6] [7] [8]Alias and External Dependency Configuration:
vite.config.mjsfiles 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.