Get resolve options preset to properly resolve files within the project. The preset matches closely Metro's behavior.
file.ios.js
)file.native.js
)exports
field in package.json
) instead of main fields (e.g. main
or browser
or react-native
)string
true
Target application platform (e.g. ios
or android
).
boolean
false
Whether to enable Package Exports support. When enabled, uses the exports
field in package.json
instead of main fields.
Package Exports support differs significantly between Metro and Re.Pack. Since this option is still marked as experimental in Metro, it's recommended to avoid using in Re.Pack for best compatbility.
For more details, please refer to the Module Resolution guide.
boolean
true
Whether to prefer native platform over generic platform when resolving extensions. When enabled, Re.pack will try .native.${ext}
before .${ext}
and after .${platform}.${ext}
during resolution.
This matches Metro's preferNativePlatform behavior.