KC's Workspace
    Preparing search index...

    Configure how TSX and JSX are transformed.

    interface JsxOptions {
        development?: boolean;
        importSource?: string;
        pragma?: string;
        pragmaFrag?: string;
        pure?: boolean;
        refresh?: boolean | ReactRefreshOptions;
        runtime?: "classic" | "automatic";
        throwIfNamespace?: boolean;
    }
    Index

    Properties

    development?: boolean

    Emit development-specific information, such as __source and __self.

    false
    
    importSource?: string

    Replaces the import source when importing functions.

    'react'
    
    pragma?: string

    Replace the function used when compiling JSX expressions. It should be a qualified name (e.g. React.createElement) or an identifier (e.g. createElement).

    Only used for classic runtime.

    'React.createElement'
    
    pragmaFrag?: string

    Replace the component used when compiling JSX fragments. It should be a valid JSX tag name.

    Only used for classic runtime.

    'React.Fragment'
    
    pure?: boolean

    Mark JSX elements and top-level React method calls as pure for tree shaking.

    true
    
    refresh?: boolean | ReactRefreshOptions

    Enable React Fast Refresh .

    Conforms to the implementation in https://github.com/facebook/react/tree/v18.3.1/packages/react-refresh

    false
    
    runtime?: "classic" | "automatic"

    Decides which runtime to use.

    • 'automatic' - auto-import the correct JSX factories
    • 'classic' - no auto-import
    'automatic'
    
    throwIfNamespace?: boolean

    Toggles whether or not to throw an error if an XML namespaced tag name is used.

    Though the JSX spec allows this, it is disabled by default since React's JSX does not currently have support for it.

    true