Allow excluding custom native modules with the `exclude` option for autolinking.
B
Bo Bramer
Right now, I can manually add a native directory for autolinking using the
expo.nativeModulesDir
entry in package.json
. However, this autolinks every module in the directory. There is normally an option (for expo modules only) to exclude modules using the expo.exclude
entry in package.json
.Based on this code, it seems that this is arbitrarily not allowed for custom native modules. (https://github.com/expo/expo/blob/main/packages/expo-modules-autolinking/src/autolinking/findModules.ts#L54-L60) This means that there is no way currently to selectively prevent custom native modules from being included, as
react-native.config.js
is not respected by expo autolinking.