UNPKG

@callstack/repack-plugin-nativewind

Version:

A plugin for @callstack/repack that integrates NativeWind

27 lines (26 loc) 994 B
import type { Compiler as RspackCompiler } from '@rspack/core'; import type { CssToReactNativeRuntimeOptions } from 'react-native-css-interop/css-to-rn'; import type { Compiler as WebpackCompiler } from 'webpack'; interface NativeWindPluginOptions { /** * Whether to check if the required dependencies are installed in the project. * If not, an error will be thrown. Defaults to `true`. */ checkDependencies?: boolean; /** * Custom cssToReactNativeRuntime options. */ cssInteropOptions?: Omit<CssToReactNativeRuntimeOptions, 'cache'>; } export declare class NativeWindPlugin { private options; constructor(options?: NativeWindPluginOptions); private configureSwcLoaderForNativeWind; private handleRuleUseField; private handleRuleOptionsField; private ensureDependencyInstalled; private ensureNativewindDependenciesInstalled; apply(compiler: RspackCompiler): void; apply(compiler: WebpackCompiler): void; } export {};