React native React本机0.60+从自动链接中排除库
在RN 0.60中,我们获得了自动链接功能,可以在运行时链接本机依赖项。我的问题是有没有办法将某些库从自动链接中排除。我认为使用react-native.config.js文件可以实现这一点,但我还没有找到方法。如果有这样的例子,最好有它。您可以通过在RN项目顶层的react-native.config.js中添加此代码来忽略自动链接React native React本机0.60+从自动链接中排除库,react-native,autolink,React Native,Autolink,在RN 0.60中,我们获得了自动链接功能,可以在运行时链接本机依赖项。我的问题是有没有办法将某些库从自动链接中排除。我认为使用react-native.config.js文件可以实现这一点,但我还没有找到方法。如果有这样的例子,最好有它。您可以通过在RN项目顶层的react-native.config.js中添加此代码来忽略自动链接 module.exports = { dependencies: { "your_package": { platforms: {
module.exports = {
dependencies: {
"your_package": {
platforms: {
android: null,
ios: null
// add more platform to disable auto-linking for them too
}
}
}
}
通过在RN项目顶层的react-native.config.js中添加此代码,可以忽略自动链接
module.exports = {
dependencies: {
"your_package": {
platforms: {
android: null,
ios: null
// add more platform to disable auto-linking for them too
}
}
}
}
Thx:那么在你的_包中,我可以放入我想要排除的包,比如react native swiper,它将被关闭?是的@kenobi91+你添加了多个依赖项以从自动链接中排除Thx:这正是我需要的Thx:那么在你的_包中,我可以放入我想要排除的包,比如react native swiper和它将被关闭?是的@kenobi91+您添加了多个依赖项以从自动链接中排除Hx:这正是我需要的