Files
iNaturalistReactNative/babel.config.js
Ken-ichi f7dc08a704 Suggestions fixes (#972)
* Bugfix: TaxonDetails was crashing if it received a null taxon
* Send lat and lng instead of latitude and longitude to the score_image
  endpoint
* Show offline suggestions when you are offline
* Show notice when viewing offline suggestions
* Moved code unique to useOnlineSuggestions into that file
* Ensure we use a medium size image to get suggestions when dealing with
  remote URLs
* More logging around React Query retries
* Use default retry logic for useAuthenticatedQuery
* Made a module-resolver shortcut for tests
* Move offline notice above top suggestion; hide when offlines exist but onlines do too
2023-12-15 19:58:12 -08:00

42 lines
1.3 KiB
JavaScript

module.exports = {
presets: ["module:metro-react-native-babel-preset"],
plugins: [
"react-native-worklets-core/plugin",
"transform-inline-environment-variables",
"nativewind/babel",
["module-resolver", {
alias: {
api: "./src/api",
components: "./src/components",
dictionaries: "./src/dictionaries",
i18n: "./src/i18n",
images: "./src/images",
// for some reason, this doesn't seem to work for models, so I'm leaving that directory out
navigation: "./src/navigation",
providers: "./src/providers",
realmModels: "./src/realmModels",
sharedHelpers: "./src/sharedHelpers",
sharedHooks: "./src/sharedHooks",
stores: "./src/stores",
styles: "./src/styles",
tests: "./tests"
}
}],
// Reanimated 2 plugin has to be listed last https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/installation/
// react-native-vision-camera v3
// "react-native-reanimated/plugin",
// react-native-vision-camera v2
[
"react-native-reanimated/plugin",
{
globals: ["__inatVision"]
}
]
],
env: {
production: {
plugins: ["react-native-paper/babel", "transform-remove-console"]
}
}
};