webpack issue with latest Expo (version 46) and React-Native-Elements

Viewed 14

A clean-slate creation of an Expo-based React-Native app (npx create-expo-app my-app) and then installing react-native-elements runs fine on IOS, but generates the error below for running on the web. I also tried using the template provided by react-native-elements but wind-up with the same result.

   Module parse failed: Unexpected token (7:58)
   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
   | import { defaultSpacing } from './theme';
   | import { lightColors } from './colors';
   > const isClassComponent = (Component) => 
   Boolean(Component?.prototype?.isReactComponent);
   | const combineByStyles = (propName = '') => {
   |     if (propName.endsWith('Style') || propName.endsWith('style')) {
    at ./node_modules/@rneui/themed/dist/config/withTheme.js```
0 Answers
Related