A helper function that creates SWC loader configuration options optimized for React Native bundling.
This helper function is a part of getJsTransformRules
.
true
Configuration options for SWC loader.
"js" | "ts"
true
The source code syntax type.
boolean
true
Whether to enable JSX/TSX parsing and transformation.
boolean
true
Whether to use external helpers for transformations.
"automatic" | "classic"
"automatic"
The JSX runtime to use - 'automatic' for React 17+ new JSX transform or 'classic' for traditional JSX transform.
See SWC jsc.transform.react.runtime
.
boolean
false
Whether to disable transformation of import
/export
statements.
string
"react"
The source module for JSX runtime imports.
See SWC jsc.transform.react.importSource
.
boolean | string[]
false
Enable lazy loading for all imports or specific modules.
See SWC module.lazy
.