deprecated-with-module-resolver icon indicating copy to clipboard operation
deprecated-with-module-resolver copied to clipboard

Add support for React Native 0.70.5?

Open zhiwang20 opened this issue 2 years ago • 3 comments

I believe is similar to this: https://github.com/facebook/react-native/issues/34688#issuecomment-1280457682.

zhiwang20 avatar Nov 12 '22 02:11 zhiwang20

Hi,

sorry can not find the issue with minimal repo + react-native 0.70.5. you can try to add conditional in babel config to include suspected library that causing error.

  if (
          sourcePath === 'react-native' &&
          !(
            (
              currentFile.includes('node_modules/react-native/') || // macos/linux paths
              currentFile.includes('node_modules\\react-native\\')
            ) // windows path
          ) &&
          !(
            currentFile.includes('resolver/react-native/') ||
            currentFile.includes('resolver\\react-native\\')
          ) && currentFile.includes("react-native-gesture-handler") == false
        ) {
          return path
```.resolve(__dirname, 'resolver/react-native');
        }

psycheangel avatar Nov 12 '22 05:11 psycheangel

Hi,

sorry can not find the issue with minimal repo + react-native 0.70.5. you can try to add conditional in babel config to include suspected library that causing error.

  if (
          sourcePath === 'react-native' &&
          !(
            (
              currentFile.includes('node_modules/react-native/') || // macos/linux paths
              currentFile.includes('node_modules\\react-native\\')
            ) // windows path
          ) &&
          !(
            currentFile.includes('resolver/react-native/') ||
            currentFile.includes('resolver\\react-native\\')
          ) && currentFile.includes("react-native-gesture-handler") == false
        ) {
          return path
```.resolve(__dirname, 'resolver/react-native');
        }

What if I want to add below: require('../ReactNative/AppRegistry') to line 47 in /node_modules/react-natve/Libraries/Core/InitializeCore.js

zhiwang20 avatar Nov 12 '22 23:11 zhiwang20

you should use patch-package for that, because its already fixed on react-native 0.71.0.rc-0 link

psycheangel avatar Nov 13 '22 04:11 psycheangel