A helper function that creates SWC loader configuration options optimized for React Native bundling.
This helper function is a part of getJsTransformRules.
trueConfiguration options for SWC loader.
"js" | "ts"trueThe source code syntax type.
booleantrueWhether to enable JSX/TSX parsing and transformation.
booleantrueWhether 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.
booleanfalseWhether to disable transformation of import/export statements.
string"react"The source module for JSX runtime imports.
See SWC jsc.transform.react.importSource.
boolean | string[]falseEnable lazy loading for all imports or specific modules.
See SWC module.lazy.