chore: Vite 8 follow-up cleanup (native tsconfig paths + oxc transform) - #636
Merged
Conversation
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>
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.
Follow-up cleanup for the Vite 8 upgrade (#635), addressing two items raised in review/runtime warnings.
1. Native tsconfig
pathsresolutionVite 8 resolves
tsconfig.jsonpathsnatively, and it now logs a runtime warning when it detects thevite-tsconfig-pathsplugin. This switches Ladle to Vite's built-inresolve.tsconfigPathsoption and drops thevite-tsconfig-pathsdependency.hasTSConfigPathPlugin).e2e/config-tspaths.spec.tstest (imports via the@/alias), which passes in both dev and prod.This resolves the question @stevematney raised in #635.
2.
transformWithEsbuild→transformWithOxcVite 8 deprecates
transformWithEsbuild(will be removed in the future. Please migrate to transformWithOxc). The MDX plugin now usestransformWithOxc.jsx: { runtime: "automatic" }), matching the previous{ jsx: "automatic" }.jsx: { runtime: "classic" }) because that's what esbuild emitted by default — verified the oxc output is byte-identical, so the@vitejs/plugin-reactpipeline is unaffected. (oxc defaults toautomatic, which broke MDX dev rendering until pinned.)Verification
pnpm typecheck,pnpm lint,pnpm build, and the fullpnpm testsuite (16/16 tasks, incl. babel + swc MDX in dev & prod, and tsconfig-paths) all pass locally on Node 23.🤖 Generated with Claude Code