File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed
packages/plugin-react/src Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -31,12 +31,6 @@ export interface Options {
31
31
* @default "react"
32
32
*/
33
33
jsxImportSource ?: string
34
- /**
35
- * Set this to `true` to annotate the JSX factory with `\/* @__PURE__ *\/`.
36
- * This option is ignored when `jsxRuntime` is not `"automatic"`.
37
- * @default true
38
- */
39
- jsxPure ?: boolean
40
34
/**
41
35
* Babel configuration applied in both dev and prod.
42
36
*/
@@ -127,15 +121,13 @@ export default function viteReact(opts: Options = {}): PluginOption[] {
127
121
} ,
128
122
jsx : 'transform' ,
129
123
jsxImportSource : opts . jsxImportSource ,
130
- jsxSideEffects : opts . jsxPure === false ,
131
124
} ,
132
125
}
133
126
} else {
134
127
return {
135
128
esbuild : {
136
129
jsx : 'automatic' ,
137
130
jsxImportSource : opts . jsxImportSource ,
138
- jsxSideEffects : opts . jsxPure === false ,
139
131
} ,
140
132
}
141
133
}
@@ -156,6 +148,11 @@ export default function viteReact(opts: Options = {}): PluginOption[] {
156
148
'[@vitejs/plugin-react] Support for classic runtime is deprecated.' ,
157
149
)
158
150
}
151
+ if ( 'jsxPure' in opts ) {
152
+ config . logger . warnOnce (
153
+ '[@vitejs/plugin-react] jsxPure was removed. You can configure esbuild.jsxSideEffects directly.' ,
154
+ )
155
+ }
159
156
160
157
const hooks = config . plugins
161
158
. map ( ( plugin ) => plugin . api ?. reactBabel )
You can’t perform that action at this time.
0 commit comments