mirror of
https://github.com/jakejarvis/sofa.git
synced 2026-08-29 03:55:38 -04:00
- Add `privacyManifests` to `app.json` declaring crash/performance/diagnostic data collection (unlinked, non-tracking, app functionality only) and required API access reasons for UserDefaults, SystemBootTime, and FileTimestamp - Switch metro config from `withSentryConfig` wrapper to `getSentryExpoConfig` (Sentry's recommended Expo integration) and remove redundant `withSentryConfig` wrapping
34 lines
1.2 KiB
JavaScript
34 lines
1.2 KiB
JavaScript
const { getDefaultConfig } = require("expo/metro-config");
|
|
const { getSentryExpoConfig } = require("@sentry/react-native/metro");
|
|
const { withUniwindConfig } = require("uniwind/metro");
|
|
const { wrapWithReanimatedMetroConfig } = require("react-native-reanimated/metro-config");
|
|
|
|
/** @type {import('expo/metro-config').MetroConfig} */
|
|
const config = getSentryExpoConfig(__dirname, { getDefaultConfig });
|
|
|
|
config.transformer = {
|
|
...config.transformer,
|
|
babelTransformerPath: require.resolve("@lingui/metro-transformer/expo"),
|
|
};
|
|
config.resolver = {
|
|
...config.resolver,
|
|
sourceExts: [...config.resolver.sourceExts, "po", "pot"],
|
|
// Use pre-compiled ICU message parser for smaller bundles
|
|
// https://formatjs.github.io/docs/guides/react-native-hermes
|
|
resolveRequest(context, moduleName, platform) {
|
|
if (moduleName === "@formatjs/icu-messageformat-parser") {
|
|
return context.resolveRequest(
|
|
context,
|
|
"@formatjs/icu-messageformat-parser/no-parser",
|
|
platform,
|
|
);
|
|
}
|
|
return context.resolveRequest(context, moduleName, platform);
|
|
},
|
|
};
|
|
|
|
module.exports = withUniwindConfig(wrapWithReanimatedMetroConfig(config), {
|
|
cssEntryFile: "./src/global.css",
|
|
dtsFile: "./uniwind-types.d.ts",
|
|
});
|