mirror of
https://gh-proxy.org/https://github.com/tiajinsha/JKVideo
synced 2026-07-07 23:18:38 +08:00
feat:添加哨兵功能,错误日志收集,为持续迭代做准备
This commit is contained in:
23
metro.config.js
Normal file
23
metro.config.js
Normal 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;
|
||||
Reference in New Issue
Block a user