THEOplayer / react-native-theoplayer

A React Native THEOplayerView component
https://theoplayer.github.io/react-native-theoplayer/
MIT License
64 stars 21 forks source link

New V2 breaks web builds #94

Closed MwareSolutons closed 1 year ago

MwareSolutons commented 1 year ago

Compiled with problems:X

ERROR in ./node_modules/react-native-theoplayer/node_modules/react-native-svg/lib/module/ReactNativeSVG.web.js 8:22-24

export 'createElement' (imported as 'cE') was not found in 'react-native' (possible exports: AccessibilityInfo, ActivityIndicator, Alert, Animated, AppRegistry, AppState, Appearance, BackHandler, Button, CheckBox, Clipboard, DeviceEventEmitter, DeviceInfo, Dimensions, DrawerLayoutAndroid, Easing, FlatList, I18nManager, Image, ImageBackground, InputAccessoryView, InteractionManager, Keyboard, KeyboardAvoidingView, LayoutAnimation, Linking, LogBox, Modal, NativeEventEmitter, NativeModules, PanResponder, PermissionsAndroid, Picker, PixelRatio, Platform, Pressable, ProgressBar, RefreshControl, SafeAreaView, ScrollView, SectionList, Settings, Share, StatusBar, StyleSheet, Switch, Systrace, TVEventHandler, Text, TextInput, ToastAndroid, Touchable, TouchableHighlight, TouchableNativeFeedback, TouchableOpacity, TouchableWithoutFeedback, UIManager, Vibration, View, VirtualizedList, YellowBox, findNodeHandle, processColor, render, unmountComponentAtNode, unstable_createElement, useColorScheme, useLocaleContext, useWindowDimensions)

tvanlaerhoven commented 1 year ago

@MwareSolutons Yes, you'll have to add this alias as well in your webpack:

resolve: { alias: { 'react-native-svg': 'react-native-svg-web' }, }

We'll try to find a different solution in import-level for this.

tvanlaerhoven commented 1 year ago

@MwareSolutons does this work for you?

MwareSolutons commented 1 year ago

Yes that fixed it for us.