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.
React-Native 0.60+ Exclude library from autolink
Asked Answered
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
}
}
}
}
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 ? –
Pika
yes @Pika + you add multiple dependencies to exclude from auto linking –
Gregor
Thx :) that's exactly what i need –
Pika
© 2022 - 2024 — McMap. All rights reserved.