Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

hi-ogawa
Copy link

@hi-ogawa hi-ogawa commented Aug 18, 2025

Description

Related vitejs/vite-plugin-react#726

This change is necessary to support following two cases:

  • tsconfig jsx preserve + react plugin zero config
    • this works on current vite esbuild
  • tsconfig custom jsxImportSource + react plugin zero config
    • this worked before react plugin v5.0.0

Copy link

pkg-pr-new bot commented Aug 18, 2025

Open in StackBlitz

npm i https://pkg.pr.new/vitejs/rolldown-vite/@vitejs/plugin-legacy@376
npm i https://pkg.pr.new/vitejs/rolldown-vite@376

commit: 087b4af

@hi-ogawa hi-ogawa changed the title fix: use tsconfig importSource when explicit oxc.jsx.runtime = "automatic" fix: merge tsconfig importSource when explicit oxc.jsx.runtime = "automatic" Aug 18, 2025
hi-ogawa added a commit to vitejs/vite-plugin-react that referenced this pull request Aug 18, 2025
@hi-ogawa
Copy link
Author

test-build still failed on vitejs/vite-plugin-react#726. we need to change native plugin too https://github.com/rolldown/rolldown/blob/c3e5c84a2836b8fbdae30c1c4e4aad8c8f8e0744/crates/rolldown_plugin_transform/src/utils.rs#L137-L138

@sapphi-red
Copy link
Member

@hi-ogawa Are you going to create a PR to the native plugin?

@hi-ogawa
Copy link
Author

Yes, I'll port the change to native plugin.

@hi-ogawa hi-ogawa changed the title fix: merge tsconfig importSource when explicit oxc.jsx.runtime = "automatic" fix: merge tsconfig jsx options even when oxc.jsx.runtime is set Aug 18, 2025
@hi-ogawa hi-ogawa changed the title fix: merge tsconfig jsx options even when oxc.jsx.runtime is set fix: merge tsconfig jsx options even when oxc.jsx.runtime is set Aug 18, 2025
github-merge-queue bot pushed a commit to rolldown/rolldown that referenced this pull request Aug 18, 2025
github-merge-queue bot pushed a commit to rolldown/rolldown that referenced this pull request Aug 18, 2025
@sapphi-red sapphi-red merged commit e6eb30a into vitejs:rolldown-vite Aug 18, 2025
21 checks passed
@hi-ogawa hi-ogawa deleted the fix-oxc-jsx-option-tsconfig-merging branch August 18, 2025 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants