Skip to content

Commit

Permalink
feat: add throwIfNamespace option for custom JSX runtime (#9571)
Browse files Browse the repository at this point in the history
  • Loading branch information
iMrDJAi authored Sep 30, 2022
1 parent 2266d83 commit f842f74
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/plugin-react/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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
}
])

Expand Down

0 comments on commit f842f74

Please sign in to comment.