From 9cfa7d0ba8ba9218362c0ed342c20fd7fcc90a58 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Tue, 30 Dec 2025 13:40:19 +0200 Subject: [PATCH] Remove RNGH from web bundle (#9528) * remove RNGH on web * add intentionally-failing webpack alias * Update webpack.config.js --- src/components/moderation/ReportDialog/index.tsx | 3 +-- src/view/shell/BlockDrawerGesture.web.tsx | 3 +++ webpack.config.js | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 src/view/shell/BlockDrawerGesture.web.tsx diff --git a/src/components/moderation/ReportDialog/index.tsx b/src/components/moderation/ReportDialog/index.tsx index 3b7cd916e8..157ad18fb4 100644 --- a/src/components/moderation/ReportDialog/index.tsx +++ b/src/components/moderation/ReportDialog/index.tsx @@ -1,6 +1,5 @@ import React from 'react' -import {Pressable, View} from 'react-native' -import {type ScrollView} from 'react-native-gesture-handler' +import {Pressable, type ScrollView, View} from 'react-native' import {type AppBskyLabelerDefs, BSKY_LABELER_DID} from '@atproto/api' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' diff --git a/src/view/shell/BlockDrawerGesture.web.tsx b/src/view/shell/BlockDrawerGesture.web.tsx new file mode 100644 index 0000000000..4a826672e5 --- /dev/null +++ b/src/view/shell/BlockDrawerGesture.web.tsx @@ -0,0 +1,3 @@ +export function BlockDrawerGesture({children}: {children: React.ReactNode}) { + return children +} diff --git a/webpack.config.js b/webpack.config.js index 866ff1a3ba..b312a2d6c3 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -27,6 +27,7 @@ module.exports = async function (env, argv) { 'unicode-segmenter/grapheme': require .resolve('unicode-segmenter/grapheme') .replace(/\.cjs$/, '.js'), + 'react-native-gesture-handler': false, // RNGH should not be used on web, so let's cause a build error if it sneaks in }) config.module.rules = [ ...(config.module.rules || []),