feat:添加哨兵功能,错误日志收集,为持续迭代做准备

This commit is contained in:
Developer
2026-03-24 00:17:43 +08:00
parent e05484bba6
commit 9bffc16fef
10 changed files with 588 additions and 56 deletions

23
metro.config.js Normal file
View File

@@ -0,0 +1,23 @@
const path = require('path');
const {
getSentryExpoConfig
} = require("@sentry/react-native/metro");
const config = getSentryExpoConfig(__dirname);
const originalResolveRequest = config.resolver.resolveRequest;
config.resolver.resolveRequest = (context, moduleName, platform) => {
if (platform === 'web' && moduleName === 'react-native-pager-view') {
return {
filePath: path.resolve(__dirname, 'shims/react-native-pager-view.web.tsx'),
type: 'sourceFile',
};
}
if (originalResolveRequest) {
return originalResolveRequest(context, moduleName, platform);
}
return context.resolveRequest(context, moduleName, platform);
};
module.exports = config;