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.
Asked
Active
Viewed 2,614 times
1 Answers
12
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
}
}
}
}

Muhammad Iqbal
- 1,394
- 1
- 14
- 34
-
Thx :) so in "your_package" i can put what package i want to exclude like for example "react-native-swiper" and it will be turned off ? – kenobi91 May 27 '20 at 07:21
-
yes @kenobi91 + you add multiple dependencies to exclude from auto linking – Muhammad Iqbal May 27 '20 at 07:24
-
Thx :) that's exactly what i need – kenobi91 May 27 '20 at 07:26