Plan 027 Phase 4: tsdown → vp pack#319

closed1
feat/027-phase2b-anti-slop
feat/027-phase4-vp-pack
openedSep 1, 2026byAAviddaram
View on GitHubTwo-way sync enabledPR last imported 20d ago

Summary

  • Move pack config from ignored tsdown.config.ts files into per-package vite.config.ts pack blocks (vp pack only reads vite config)
  • Fix server pack: dts: false avoids miniflare/alchemy .d.ts bundling failure; dual entry for worker + alchemy
  • Update server exports to .mjs paths matching rolldown output
  • Remove tsdown from workspace catalog/devDeps
  • Tidy turbo.json: drop unused lint task, fix db task persistent flags, add lib/** build outputs

Migration speed (wall clock, local)

CommandPre-027 (main)Post-027 (this PR)
server packfailed (dts/miniflare)~8s ✓
@vit/api pack~9s (tsdown ignored)~12s
@vit/shared pack~4s~5s
@vit/assistant pack~2s~2s
turbo check-types28s6s

Pack configs now actually load (tsdown.config.ts was a no-op under vp pack).

Review bot feedback

BotFindingAction
GreptileSummary only — no blockers—
CodeRabbitSkipped (non-default base branch)—

Test plan

  • bun run --filter server build
  • bun run --filter @vit/api build
  • bun run --filter @vit/shared build
  • bun run --filter @vit/assistant build

Stacked on #318.

Checks

2 failing · 3 successful · 1 skipped
Some checks failed

Failing2

4226c25
Synced from GitHub

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (1)
  • v2

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Team

Run ID: 2d621f83-ec2e-4ed5-8918-c51c61ab2328

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Synced from GitHub

Greptile Summary

The PR migrates package builds from ignored tsdown configuration files to vite-plus pack blocks and aligns the server’s exports with its new lib/*.mjs output.

  • Adds vite-plus pack configuration for the server, API, assistant, and shared packages.
  • Builds both server and Alchemy entry points while disabling server declaration bundling.
  • Removes tsdown from workspace dependencies and refreshes the lockfile.
  • Updates Turbo build outputs and database task persistence settings.

Confidence Score: 5/5

The PR appears safe to merge based on the reviewed configuration, package contracts, and reachable repository consumers.

The migrated package configurations retain their prior pack settings, the server’s source-based deployment paths remain intact, and no concrete consumer was found that is broken by the changed exports or declaration behavior.

Important Files Changed

FilenameOverview
apps/server/vite.config.tsAdds the server’s dual-entry vp pack configuration, emits ESM into lib, and disables declaration generation.
apps/server/package.jsonUpdates non-Bun package exports from .js to .mjs paths matching the intended server build output.
packages/api/vite.config.tsMoves the API package’s declaration-enabled pack settings into the vite-plus configuration format.
packages/assistant/vite.config.tsMoves the assistant package’s declaration-enabled pack settings into the vite-plus configuration format.
packages/shared/vite.config.tsMoves the shared package’s declaration-enabled pack settings into the vite-plus configuration format.
turbo.jsonAdds lib/** to cached build outputs, removes unused lint orchestration, and makes finite database tasks non-persistent.
package.jsonRemoves the obsolete tsdown dependency after migrating package builds to vp pack.
bun.lockRefreshes dependency resolutions after removing tsdown and its transitive dependency graph.

Flowchart

mermaid
1%%{init: {'theme': 'neutral'}}%%
2flowchart LR
3 Config[vite.config.ts pack blocks] --> VP[vp pack]
4 VP --> Server[apps/server/lib/*.mjs]
5 VP --> Packages[package build artifacts]
6 Server --> Exports[server package exports]
7 Packages --> Turbo[Turbo dist/** and lib/** cache outputs]

Reviews (1): Last reviewed commit: "chore(tooling): Plan 027 Phase 4 migrate..." | Re-trigger Greptile

Added 1 commit

  • chore(tooling): Plan 027 Phase 4 migrate tsdown configs to vp pack4226c25

Closing: this branch's head commit is already in main (Plan 027 lint stack landed via merge 4bf54d3).