Open rollsroyc3 opened 5 years ago
Sure! There's no magic to it really, just don't bundle them with the app. For Android use the gradle approach and for iOS just remove them from the build phase (in Xcode) where the fonts are copied 🙂
@hampustagerud I tried to reduce my bundle size by removing unused icons using the following. But the size is still same.
project.ext.vectoricons = [
iconFontNames: [ 'MaterialIcons.ttf', 'EvilIcons.ttf' ] // Name of the font files you want to copy
]
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
On iOS, I can remove them from the build phase, but they reappear automatically after a pod install
. It'd be nice to not have to do that, although I'm not sure how to get there.
I currently use RNVI for the following fonts:
Im wondering if its possible (or even worth it) to remove the unused fonts to decrease bloat, etc.. I think there are 8 that I dont use, so dont see a reason to keeping them unless its a pain to remove..