diff --git a/packages/plugin-react/src/index.ts b/packages/plugin-react/src/index.ts index 5a82b0a2a6cd0e..3617605afc686d 100644 --- a/packages/plugin-react/src/index.ts +++ b/packages/plugin-react/src/index.ts @@ -40,6 +40,11 @@ export interface Options { * @default true */ jsxPure?: boolean + /** + * Toggles whether or not to throw an error if an XML namespaced tag name is used. + * @default true + */ + jsxThrowIfNamespace?: boolean /** * Babel configuration applied in both dev and prod. */ @@ -248,7 +253,8 @@ export default function viteReact(opts: Options = {}): PluginOption[] { { runtime: 'automatic', importSource: opts.jsxImportSource, - pure: opts.jsxPure !== false + pure: opts.jsxPure !== false, + throwIfNamespace: opts.jsxThrowIfNamespace } ])