Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/mesozoic/lib/swc.ts>Types.ReactConfig

A generic build system for Deno web apps
Go to Latest
interface Types.ReactConfig
import { type Types } from "https://deno.land/x/mesozoic@v1.0.1/lib/swc.ts";
const { ReactConfig } = Types;

Properties

optional
pragma: string

Replace the function used when compiling JSX expressions.

Defaults to React.createElement.

optional
pragmaFrag: string

Replace the component used when compiling JSX fragments.

Defaults to React.Fragment

optional
throwIfNamespace: boolean

Toggles whether or not to throw an error if a XML namespaced tag name is used. For example: <f:image />

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

optional
development: boolean

Toggles plugins that aid in development, such as @swc/plugin-transform-react-jsx-self and @swc/plugin-transform-react-jsx-source.

Defaults to false,

optional
useBuiltins: boolean

Use Object.assign() instead of _extends. Defaults to false.

optional
refresh: boolean

Enable fast refresh feature for React app

optional
runtime: "automatic" | "classic"

jsx runtime

optional
importSource: string

Declares the module specifier to be used for importing the jsx and jsxs factory functions when using runtime 'automatic'