Skip to main content

Babel

Options can be provided via the babel config

// babel.config.js
module.exports = {
plugins: [
["nativewind/babel", { tailwindConfig: "./tailwind.native.config.js" }],
],
};
OptionValuesDefaultDescription
modecompileAndTransform, compileOnly, transformOnlycompileAndTransform
tailwindConfigPath relative to cwdtailwind.config.jsProvide a custom tailwind.config.js. Useful for setting a different theme per platform.
allowModuleTransform*, string[]*Only transform components from these imported modules. * will transform all modules.
blockModuleTransformstring[][]Do not transform components from these imported modules.