Migrate build system from Vite to tsdown#163
Merged
bartveneman merged 5 commits intomainfrom Mar 8, 2026
Merged
Conversation
- Add tsdown.config.ts with multiple entry points, dts, publint, and codecovRollupPlugin for bundle analysis - Remove vite.config.ts and tsconfig.build.json (tsdown handles both bundling and DTS generation) - Switch build script from "vite build && tsc --project tsconfig.build.json" to "tsdown" - Remove lint-package script and lint-package CI job (publint now runs as part of the build via tsdown's publint: true) - Swap @codecov/vite-plugin for @codecov/rollup-plugin - Remove publint and vite devDependencies; add tsdown ^0.21.0 - Remove overrides block (was only needed for vite plugin) - Update package.json exports from .js/.d.ts to .mjs/.d.mts to match tsdown's default ESM output - Update build test imports to use .mjs extensions https://claude.ai/code/session_01RDMRwtqcxjAab9FfApm26G
Bundle ReportChanges will increase total bundle size by 8.42kB (5.59%) ⬆️
Affected Assets, Files, and Routes:view changes for bundle: @projectwallace/css-parser-esmAssets Changed:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #163 +/- ##
=======================================
Coverage 94.92% 94.92%
=======================================
Files 16 16
Lines 2797 2797
Branches 736 736
=======================================
Hits 2655 2655
Misses 142 142 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Use outExtensions in tsdown config to output .js and .d.ts instead of the default .mjs/.d.mts, so codecov can compare bundle sizes against the existing baseline. https://claude.ai/code/session_01RDMRwtqcxjAab9FfApm26G
platform: neutral sets fixedExtension=false, which combined with "type": "module" in package.json causes tsdown to output .js files by default — no need for an explicit outExtensions override. https://claude.ai/code/session_01RDMRwtqcxjAab9FfApm26G
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
This PR migrates the project's build system from Vite to tsdown, simplifying the build configuration and improving ES module output consistency.
Key Changes
Build tool migration: Replaced Vite with tsdown as the primary build tool
vite.config.tsandtsconfig.build.jsontsdown.config.tswith entry points for all library exportsvite build && tscto justtsdownOutput file extensions: Changed generated file extensions for consistency
.js→.mjs(explicit ES module).d.ts→.d.mts(matching module format)package.jsonand test filesDependency updates:
vite,publint,@codecov/vite-plugintsdown,@codecov/rollup-pluginCI/CD simplification: Removed dedicated
lint-packageworkflow job that ran publint separately (now handled by tsdown)Test updates: Updated all import paths in
test/build/exports.test.tsto reference.mjsand.d.mtsfilesImplementation Details
The tsdown configuration maintains the same entry points as the previous Vite setup, ensuring all library exports remain accessible. The
publintvalidation is now integrated into the build process via tsdown's built-in support, eliminating the need for a separate linting step.https://claude.ai/code/session_01RDMRwtqcxjAab9FfApm26G