diff --git a/app/src/examples/WithoutBabelPluginExample.tsx b/app/src/examples/WithoutBabelPluginExample.tsx index 758a3c32a0b..5324228025b 100644 --- a/app/src/examples/WithoutBabelPluginExample.tsx +++ b/app/src/examples/WithoutBabelPluginExample.tsx @@ -1,4 +1,5 @@ import Animated, { + isWorklet, useAnimatedStyle, useSharedValue, withSpring, @@ -14,9 +15,10 @@ import { StyleSheet, Text, View } from 'react-native'; enableExperimentalWebImplementation(true); function isBabelPluginEnabled() { - 'inject Reanimated Babel plugin version'; - // @ts-ignore - return global._REANIMATED_VERSION_BABEL_PLUGIN !== undefined; + function worklet() { + 'worklet'; + } + return isWorklet(worklet); } export default function WithoutBabelPluginExample() { diff --git a/src/reanimated2/globals.d.ts b/src/reanimated2/globals.d.ts index dbc346cc2a9..d75da14e130 100644 --- a/src/reanimated2/globals.d.ts +++ b/src/reanimated2/globals.d.ts @@ -24,7 +24,6 @@ declare global { var _IS_FABRIC: boolean | undefined; var _REANIMATED_VERSION_CPP: string | undefined; var _REANIMATED_VERSION_JS: string | undefined; - var _REANIMATED_VERSION_BABEL_PLUGIN: string | undefined; var __reanimatedModuleProxy: NativeReanimatedModule | undefined; var __callGuardDEV: typeof callGuardDEV | undefined; var evalWithSourceMap: