A helper function that generates module.rules configuration for handling assets in React Native applications.
This helper function allows you to create a single configuration for all assets in your project. If you need more granular control over asset processing, refer to the assetsLoader documentation.
Configuration options for asset transformations.
booleanWhether to inline assets as base64 URIs.
Learn more about the inlining assets in the Inlining Assets guide.
objectConfiguration for remote asset loading.
Learn more about using remote assets in the Remote Assets guide.
stringtruePublic path for loading remote assets.
See assetsLoader documentation for reference.
(args: { resourcePath: string; resourceFilename: string; resourceDirname: string; resourceExtensionType: string; }) => stringA function to customize how the asset path is generated for remote assets.
See assetsLoader documentation for reference.
'svgr' | 'xml' | 'uri' | { type: "svgr", options: Record<string, any>}Determines how SVG files should be processed:
'svgr': Uses @svgr/webpack to transform SVGs into React Native components
type: "svgr": Uses @svgr/webpack to transform SVGs into React Native components and allows to configure additional options to @svgr/webpack.'xml': Loads SVGs as raw XML source to be used with SvgXml from react-native-svg'uri': Loads SVGs as inline URIs to be used with SvgUri from react-native-svgRecord<string, any>Allows to configure additional options to @svgr/webpack. The full list of available options can be found in the svgr doc.
Learn more about using SVG in the SVG guide.