@vitejs/plugin-react 4.4.0-beta.2 → 4.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -190,7 +190,10 @@ function viteReact(opts = {}) {
190
190
  { skipEnvCheck: true }
191
191
  ]);
192
192
  }
193
- if (opts.jsxRuntime === "classic" && isJSX) {
193
+ if (opts.jsxRuntime === "classic" && isJSX && // OXC injects self and source so these plugins are not needed for rolldown-vite
194
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
195
+ // @ts-ignore -- this.meta.rolldownVersion only exists in rolldown-vite
196
+ !this.meta.rolldownVersion) {
194
197
  if (!isProduction) {
195
198
  plugins.push(
196
199
  await loadPlugin("@babel/plugin-transform-react-jsx-self"),
package/dist/index.mjs CHANGED
@@ -187,7 +187,10 @@ function viteReact(opts = {}) {
187
187
  { skipEnvCheck: true }
188
188
  ]);
189
189
  }
190
- if (opts.jsxRuntime === "classic" && isJSX) {
190
+ if (opts.jsxRuntime === "classic" && isJSX && // OXC injects self and source so these plugins are not needed for rolldown-vite
191
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
192
+ // @ts-ignore -- this.meta.rolldownVersion only exists in rolldown-vite
193
+ !this.meta.rolldownVersion) {
191
194
  if (!isProduction) {
192
195
  plugins.push(
193
196
  await loadPlugin("@babel/plugin-transform-react-jsx-self"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitejs/plugin-react",
3
- "version": "4.4.0-beta.2",
3
+ "version": "4.4.1",
4
4
  "license": "MIT",
5
5
  "author": "Evan You",
6
6
  "description": "The default Vite plugin for React projects",
@@ -22,7 +22,7 @@
22
22
  "type": "module",
23
23
  "main": "./dist/index.cjs",
24
24
  "module": "./dist/index.mjs",
25
- "types": "./dist/index.d.ts",
25
+ "types": "./dist/index.d.mts",
26
26
  "exports": {
27
27
  ".": {
28
28
  "import": "./dist/index.mjs",