mirror of
https://github.com/RSSNext/Folo.git
synced 2026-10-29 03:46:58 +08:00
- Added Sentry for error reporting in the mobile application. - Updated the app configuration to initialize Sentry with the necessary DSN and settings. - Replaced Firebase Crashlytics with Sentry for error capturing in the ErrorBoundary component. - Updated various workflows to include Sentry authentication token. - Adjusted dependencies to use React Native version 0.79.6 and updated related packages. This integration enhances the application's ability to track and manage errors effectively. Signed-off-by: Innei <tukon479@gmail.com>
49 lines
1.5 KiB
JavaScript
49 lines
1.5 KiB
JavaScript
const { withNativeWind } = require("nativewind/metro")
|
|
const path = require("pathe")
|
|
const { wrapWithReanimatedMetroConfig } = require("react-native-reanimated/metro-config")
|
|
const { getSentryExpoConfig } = require("@sentry/react-native/metro")
|
|
|
|
const config = getSentryExpoConfig(__dirname, { isCSSEnabled: true })
|
|
config.resolver.sourceExts.push("sql")
|
|
|
|
config.transformer.getTransformOptions = async () => ({
|
|
transform: {
|
|
experimentalImportSupport: false,
|
|
inlineRequires: true,
|
|
},
|
|
})
|
|
|
|
config.resolver.nodeModulesPaths = [
|
|
path.resolve(__dirname, "./node_modules"),
|
|
path.resolve(__dirname, "../../node_modules"),
|
|
]
|
|
|
|
config.resolver.extraNodeModules = {
|
|
...config.resolver.extraNodeModules,
|
|
"@locales": path.resolve(__dirname, "../../locales"),
|
|
}
|
|
|
|
config.watchFolders = [...config.watchFolders, path.resolve(__dirname, "../../locales")]
|
|
|
|
config.resolver.resolveRequest = (context, moduleName, platform) => {
|
|
const result = context.resolveRequest(context, moduleName, platform)
|
|
if (result.type === "sourceFile") {
|
|
const lastDotIndex = result.filePath.lastIndexOf(".")
|
|
const mobilePath = `${result.filePath.slice(0, lastDotIndex)}.rn${result.filePath.slice(lastDotIndex)}`
|
|
const file = context.fileSystemLookup(mobilePath)
|
|
if (file.exists) {
|
|
return {
|
|
...result,
|
|
filePath: mobilePath,
|
|
}
|
|
} else {
|
|
return result
|
|
}
|
|
}
|
|
return result
|
|
}
|
|
|
|
module.exports = wrapWithReanimatedMetroConfig(
|
|
withNativeWind(config, { input: "./src/global.css" }),
|
|
)
|