block RN GH on the web

This commit is contained in:
Oleksii Bulenok
2026-08-13 12:17:05 +02:00
parent fb84afb693
commit b8e96f9eaf
+8
View File
@@ -29,6 +29,14 @@ const config = getSentryExpoConfig(import.meta.dirname, {
}
const resolver: CustomResolver = (context, moduleName, platform) => {
if (
platform === 'web' &&
/^react-native-gesture-handler(\/|$)/.test(moduleName)
) {
throw new Error(
`react-native-gesture-handler must not be imported on web (requested from ${context.originModulePath})`,
)
}
/*
* react-native-webview has no web implementation (its fallback renders
* "does not support this platform"), so swap in react-native-web-webview