-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Description
Description
On upgrading to 2.27.1 (which persists on 2.28.0), I believe NativeViewGestureHandler.ts
is not being transpiled to JavaScript for use on React Native Web.
This may be user error here, but I'm not sure.
All files seem to have been transpiled correctly within lib/module/web
- with the exception of NativeViewGestureHandlers.ts
.

This results in the following error in React Native Web:
ERROR in ./node_modules/react-native-gesture-handler/lib/module/web_hammer/NativeViewGestureHandler.ts 12:15
Module parse failed: Unexpected token (12:15)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| }
|
> onRawEvent(ev: HammerInputExt) {
| super.onRawEvent(ev);
| if (!ev.isFinal) {
@ ./node_modules/react-native-gesture-handler/lib/module/web/Gestures.js 15:0-84 34:28-58
@ ./node_modules/react-native-gesture-handler/lib/module/RNGestureHandlerModule.web.js 5:0-58 26:27-35 29:27-35 33:27-41 39:27-41
@ ./node_modules/react-native-gesture-handler/lib/module/init.js 4:0-62 15:4-34
@ ./node_modules/react-native-gesture-handler/lib/module/index.js 3:0-36 30:0-10
@ ./index.js 3:166-205
This can be fixed by putting the library through Babel in your Webpack config, but I think it may be a bug?
Steps to reproduce
- Run React Native Web with the latest gesture-handler package; do not pass it through Babel
A link to a Gist, an Expo Snack or a link to a repository based on this template that reproduces the bug.
N/A
Gesture Handler version
2.27.1
React Native version
0.79.0
Platforms
Web