3

I have initially integrated react-redux for mobile platform , and it is working fine. But then i have integrated react-native-web in my existing project so now it is throwing error at runtime.

React: 16.13.1 ReactDOM/React Native: ^0.65.1 Redux:^4.0.5 React Redux:^7.2.4

Uncaught ReferenceError: exports is not defined at eval (extends.js:2) at Module../node_modules/react-redux/node_modules/@babel/runtime/helpers/esm/extends.js

m4n0
  • 29,823
  • 27
  • 76
  • 89
Dwipal Parmar
  • 244
  • 2
  • 8

1 Answers1

0

I was having this same issue. For me, i had included node_modules to the babel config, so it was actually transpiling babel code itself so it was giving this error. For me the fix was to exclude babel from babel confing. Basically, I added this line in the babel config and it was fine.

exclude: [path.resolve(appDirectory, "node_modules/@babel")