Skip to content

chore: Vite 8 follow-up cleanup (native tsconfig paths + oxc transform) - #636

Merged
tajo merged 1 commit into
mainfrom
chore/vite8-followup-cleanup
Jun 28, 2026
Merged

chore: Vite 8 follow-up cleanup (native tsconfig paths + oxc transform)#636
tajo merged 1 commit into
mainfrom
chore/vite8-followup-cleanup

Conversation

@tajo

@tajo tajo commented Jun 28, 2026

Copy link
Copy Markdown
Owner

Follow-up cleanup for the Vite 8 upgrade (#635), addressing two items raised in review/runtime warnings.

1. Native tsconfig paths resolution

Vite 8 resolves tsconfig.json paths natively, and it now logs a runtime warning when it detects the vite-tsconfig-paths plugin. This switches Ladle to Vite's built-in resolve.tsconfigPaths option and drops the vite-tsconfig-paths dependency.

  • Same guards preserved: skipped under Yarn PnP, and skipped when the user already supplies their own tsconfig-paths plugin (hasTSConfigPathPlugin).
  • Covered by the existing e2e/config-ts paths.spec.ts test (imports via the @/ alias), which passes in both dev and prod.

This resolves the question @stevematney raised in #635.

2. transformWithEsbuildtransformWithOxc

Vite 8 deprecates transformWithEsbuild (will be removed in the future. Please migrate to transformWithOxc). The MDX plugin now uses transformWithOxc.

  • Prod path uses the automatic runtime (jsx: { runtime: "automatic" }), matching the previous { jsx: "automatic" }.
  • The dev (babel) path pins the classic runtime (jsx: { runtime: "classic" }) because that's what esbuild emitted by default — verified the oxc output is byte-identical, so the @vitejs/plugin-react pipeline is unaffected. (oxc defaults to automatic, which broke MDX dev rendering until pinned.)

Verification

pnpm typecheck, pnpm lint, pnpm build, and the full pnpm test suite (16/16 tasks, incl. babel + swc MDX in dev & prod, and tsconfig-paths) all pass locally on Node 23.

🤖 Generated with Claude Code

Address two follow-ups from the Vite 8 upgrade (#635):

- Replace the vite-tsconfig-paths plugin with Vite 8's native
  resolve.tsconfigPaths option and drop the dependency. Still skipped
  under Yarn PnP or when the user supplies their own plugin.
- Migrate the MDX plugin off the deprecated transformWithEsbuild to
  transformWithOxc. The dev (babel) path pins the classic JSX runtime to
  keep the emitted output byte-identical to the previous esbuild default.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@tajo
tajo merged commit eae9c03 into main Jun 28, 2026
2 checks passed
@tajo
tajo deleted the chore/vite8-followup-cleanup branch June 28, 2026 00:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant