React-Native 0.60+ Exclude library from autolink

3.1k Views Asked by At

In RN 0.60 we got autolink feature that will link native dependencies at runtime. My question is is there way to exclude some libraries from autolink. I think this can be achived using react-native.config.js file but i haven't found way to do it yet. If there is any example for this it would be great to have it.

1

There are 1 best solutions below

3
Muhammad Iqbal On BEST ANSWER

you can ignore auto-linking by adding this code in react-native.config.js at the top level of your RN Project.

module.exports = {
  dependencies: {
    "your_package": {
      platforms: {
        android: null,
        ios: null
        // add more platform to disable auto-linking for them too
      }
    }
  }
}