Skip to content

Conversation

Comment on lines 155 to 156
runtime: 'automatic',
importSource: jsxImportSource,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I needed to remove runtime too since rolldown-vite merge oxc option with tsconfig only when runtime === undefined. Is this intended or allow also runtime === 'automatic'? @sapphi-red https://github.com/vitejs/rolldown-vite/blob/f88cb05e755457fd9ea99174a017c49964510c3f/packages/vite/src/node/plugins/oxc.ts#L65-L68

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the vite-rolldown code as is, this would mean that users having jsx === 'preserve' in tsconfig will now have broken apps I think.
Is this also the same logic for the esbuild?

Copy link
Contributor Author

@hi-ogawa hi-ogawa Aug 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I didn't know react plugin is ensuring automatic so that tsconfig's jsx preserve will be ignored. Probably rolldown-vite oxc option merging needs to be tweaked. I'll also add that test case too then.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't know react plugin is ensuring automatic so that tsconfig's jsx preserve will be ignored
I'm not sure it's a goal, but with the current implementation of vite-rolldown it happen to be the case.

@hi-ogawa
Copy link
Contributor Author

test-build is failing because of native plugin vitejs/rolldown-vite#376 (comment)

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
Copy link
Member

@hi-ogawa I've released rolldown-vite v7.1.3, which includes the fixes.

@hi-ogawa hi-ogawa force-pushed the fix-tsconfig-jsxImportSource branch from 3948fc1 to ea00b55 Compare August 18, 2025 09:06
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx",
"jsxImportSource": "@emotion/react",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can update the playground/emotion to comment the manual jsxImportSource (saying we expect to be infered from tsconfig)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea. I should reuse that but I'm not sure how to get esbuild to pickup tsconfig for jsx. I'll update the example to tsx in a later PR and remove this one.

@hi-ogawa hi-ogawa merged commit e2f0c78 into main Aug 19, 2025
20 checks passed
@hi-ogawa hi-ogawa deleted the fix-tsconfig-jsxImportSource branch August 19, 2025 02:17
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Aug 23, 2025
| datasource | package              | from  | to    |
| ---------- | -------------------- | ----- | ----- |
| npm        | @vitejs/plugin-react | 4.7.0 | 5.0.1 |


## [v5.0.1](https://github.com/vitejs/vite-plugin-react/blob/HEAD/packages/plugin-react/CHANGELOG.md#501-2025-08-19)

##### Set `optimizeDeps.rollupOptions.transform.jsx` instead of `optimizeDeps.rollupOptions.jsx` for rolldown-vite ([#735](vitejs/vite-plugin-react#735))

`optimizeDeps.rollupOptions.jsx` is going to be deprecated in favor of `optimizeDeps.rollupOptions.transform.jsx`.

##### Perf: skip `babel-plugin-react-compiler` if code has no `"use memo"` when `{ compilationMode: "annotation" }` ([#734](vitejs/vite-plugin-react#734))

##### Respect tsconfig `jsxImportSource` ([#726](vitejs/vite-plugin-react#726))

##### Fix `reactRefreshHost` option on rolldown-vite ([#716](vitejs/vite-plugin-react#716))

##### Fix `RefreshRuntime` being injected twice for class components on rolldown-vite ([#708](vitejs/vite-plugin-react#708))

##### Skip `babel-plugin-react-compiler` on non client environment ([689](vitejs/vite-plugin-react#689))


## [v5.0.0](https://github.com/vitejs/vite-plugin-react/blob/HEAD/packages/plugin-react/CHANGELOG.md#500-2025-08-07)
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Aug 23, 2025
| datasource | package              | from  | to    |
| ---------- | -------------------- | ----- | ----- |
| npm        | @vitejs/plugin-react | 4.7.0 | 5.0.1 |


## [v5.0.1](https://github.com/vitejs/vite-plugin-react/blob/HEAD/packages/plugin-react/CHANGELOG.md#501-2025-08-19)

##### Set `optimizeDeps.rollupOptions.transform.jsx` instead of `optimizeDeps.rollupOptions.jsx` for rolldown-vite ([#735](vitejs/vite-plugin-react#735))

`optimizeDeps.rollupOptions.jsx` is going to be deprecated in favor of `optimizeDeps.rollupOptions.transform.jsx`.

##### Perf: skip `babel-plugin-react-compiler` if code has no `"use memo"` when `{ compilationMode: "annotation" }` ([#734](vitejs/vite-plugin-react#734))

##### Respect tsconfig `jsxImportSource` ([#726](vitejs/vite-plugin-react#726))

##### Fix `reactRefreshHost` option on rolldown-vite ([#716](vitejs/vite-plugin-react#716))

##### Fix `RefreshRuntime` being injected twice for class components on rolldown-vite ([#708](vitejs/vite-plugin-react#708))

##### Skip `babel-plugin-react-compiler` on non client environment ([689](vitejs/vite-plugin-react#689))


## [v5.0.0](https://github.com/vitejs/vite-plugin-react/blob/HEAD/packages/plugin-react/CHANGELOG.md#500-2025-08-07)
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Aug 24, 2025
| datasource | package              | from  | to    |
| ---------- | -------------------- | ----- | ----- |
| npm        | @vitejs/plugin-react | 4.7.0 | 5.0.1 |


## [v5.0.1](https://github.com/vitejs/vite-plugin-react/blob/HEAD/packages/plugin-react/CHANGELOG.md#501-2025-08-19)

##### Set `optimizeDeps.rollupOptions.transform.jsx` instead of `optimizeDeps.rollupOptions.jsx` for rolldown-vite ([#735](vitejs/vite-plugin-react#735))

`optimizeDeps.rollupOptions.jsx` is going to be deprecated in favor of `optimizeDeps.rollupOptions.transform.jsx`.

##### Perf: skip `babel-plugin-react-compiler` if code has no `"use memo"` when `{ compilationMode: "annotation" }` ([#734](vitejs/vite-plugin-react#734))

##### Respect tsconfig `jsxImportSource` ([#726](vitejs/vite-plugin-react#726))

##### Fix `reactRefreshHost` option on rolldown-vite ([#716](vitejs/vite-plugin-react#716))

##### Fix `RefreshRuntime` being injected twice for class components on rolldown-vite ([#708](vitejs/vite-plugin-react#708))

##### Skip `babel-plugin-react-compiler` on non client environment ([689](vitejs/vite-plugin-react#689))


## [v5.0.0](https://github.com/vitejs/vite-plugin-react/blob/HEAD/packages/plugin-react/CHANGELOG.md#500-2025-08-07)
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Sep 1, 2025
| datasource | package              | from  | to    |
| ---------- | -------------------- | ----- | ----- |
| npm        | @vitejs/plugin-react | 4.7.0 | 5.0.2 |


## [v5.0.2](https://github.com/vitejs/vite-plugin-react/blob/HEAD/packages/plugin-react/CHANGELOG.md#502-2025-08-28)

##### Skip transform hook completely in rolldown-vite in dev if possible ([#783](vitejs/vite-plugin-react#783))


## [v5.0.1](https://github.com/vitejs/vite-plugin-react/blob/HEAD/packages/plugin-react/CHANGELOG.md#501-2025-08-19)

##### Set `optimizeDeps.rollupOptions.transform.jsx` instead of `optimizeDeps.rollupOptions.jsx` for rolldown-vite ([#735](vitejs/vite-plugin-react#735))

`optimizeDeps.rollupOptions.jsx` is going to be deprecated in favor of `optimizeDeps.rollupOptions.transform.jsx`.

##### Perf: skip `babel-plugin-react-compiler` if code has no `"use memo"` when `{ compilationMode: "annotation" }` ([#734](vitejs/vite-plugin-react#734))

##### Respect tsconfig `jsxImportSource` ([#726](vitejs/vite-plugin-react#726))

##### Fix `reactRefreshHost` option on rolldown-vite ([#716](vitejs/vite-plugin-react#716))

##### Fix `RefreshRuntime` being injected twice for class components on rolldown-vite ([#708](vitejs/vite-plugin-react#708))

##### Skip `babel-plugin-react-compiler` on non client environment ([689](vitejs/vite-plugin-react#689))


## [v5.0.0](https://github.com/vitejs/vite-plugin-react/blob/HEAD/packages/plugin-react/CHANGELOG.md#500-2025-08-07)
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Sep 1, 2025
| datasource | package              | from  | to    |
| ---------- | -------------------- | ----- | ----- |
| npm        | @vitejs/plugin-react | 4.7.0 | 5.0.2 |


## [v5.0.2](https://github.com/vitejs/vite-plugin-react/blob/HEAD/packages/plugin-react/CHANGELOG.md#502-2025-08-28)

##### Skip transform hook completely in rolldown-vite in dev if possible ([#783](vitejs/vite-plugin-react#783))


## [v5.0.1](https://github.com/vitejs/vite-plugin-react/blob/HEAD/packages/plugin-react/CHANGELOG.md#501-2025-08-19)

##### Set `optimizeDeps.rollupOptions.transform.jsx` instead of `optimizeDeps.rollupOptions.jsx` for rolldown-vite ([#735](vitejs/vite-plugin-react#735))

`optimizeDeps.rollupOptions.jsx` is going to be deprecated in favor of `optimizeDeps.rollupOptions.transform.jsx`.

##### Perf: skip `babel-plugin-react-compiler` if code has no `"use memo"` when `{ compilationMode: "annotation" }` ([#734](vitejs/vite-plugin-react#734))

##### Respect tsconfig `jsxImportSource` ([#726](vitejs/vite-plugin-react#726))

##### Fix `reactRefreshHost` option on rolldown-vite ([#716](vitejs/vite-plugin-react#716))

##### Fix `RefreshRuntime` being injected twice for class components on rolldown-vite ([#708](vitejs/vite-plugin-react#708))

##### Skip `babel-plugin-react-compiler` on non client environment ([689](vitejs/vite-plugin-react#689))


## [v5.0.0](https://github.com/vitejs/vite-plugin-react/blob/HEAD/packages/plugin-react/CHANGELOG.md#500-2025-08-07)
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.

plugin-react no longer respects jsxImportSource settings from tsconfig
3 participants