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 {
3131 * @default "react"
3232 */
3333 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
4034 /**
4135 * Babel configuration applied in both dev and prod.
4236 */
@@ -127,15 +121,13 @@ export default function viteReact(opts: Options = {}): PluginOption[] {
127121 } ,
128122 jsx : 'transform' ,
129123 jsxImportSource : opts . jsxImportSource ,
130- jsxSideEffects : opts . jsxPure === false ,
131124 } ,
132125 }
133126 } else {
134127 return {
135128 esbuild : {
136129 jsx : 'automatic' ,
137130 jsxImportSource : opts . jsxImportSource ,
138- jsxSideEffects : opts . jsxPure === false ,
139131 } ,
140132 }
141133 }
@@ -156,6 +148,11 @@ export default function viteReact(opts: Options = {}): PluginOption[] {
156148 '[@vitejs/plugin-react] Support for classic runtime is deprecated.' ,
157149 )
158150 }
151+ if ( 'jsxPure' in opts ) {
152+ config . logger . warnOnce (
153+ '[@vitejs/plugin-react] jsxPure was removed. You can configure esbuild.jsxSideEffects directly.' ,
154+ )
155+ }
159156
160157 const hooks = config . plugins
161158 . map ( ( plugin ) => plugin . api ?. reactBabel )
You can’t perform that action at this time.
0 commit comments