react-native-vector-icons
react-native-vector-icons copied to clipboard
Add monorepo documentation for specifying iconFontsDir
Environment
macOS 10.15.4 Android 6.6.0
Description
In a monorepo setup, icons do not appear to render and show a rectangle with lines through them.

Reproducible Demo
Using a monorepo setup and with yarn workspaces, the node_modules are installed at the root of the monorepo. The path to the icons needs to be updated with the new relative path:
project.ext.vectoricons = [
iconFontsDir: "../../../../node_modules/react-native-vector-icons/Fonts"
]
apply from: file("../../../../node_modules/react-native-vector-icons/fonts.gradle");
I have this issue, please help us :'(
@jgornick hey joe, sorry to bother you. i'm struggling to get the icons to show on android with a monorepo setup. I've added the iconFontsDir, and looking inside the apk the fonts are getting copied to assets/fonts
. But they still don't show up in the app. Is there anything else I need to change? I've tried copying them manually too, which doesn't work either. Any hints would be most welcome.
Sorry @robclouth and @ReeVicente, the only help I can provide is in the solution I included above by specifying the iconFonsDir
and applying the fonts.gradle
. Just make sure the (relative) paths are correct.
I figured it out. In expo bare workflow you need to manually import the fonts with expo-font. Two days down the drain because of that...🤦🏻♂️ Thanks for replying though!
On Tue, 10 Nov 2020, 20:15 Joe Gornick, [email protected] wrote:
Sorry @robclouth https://github.com/robclouth and @ReeVicente https://github.com/ReeVicente, the only help I can provide is in the solution I included above by specifying the iconFonsDir and applying the fonts.gradle.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/oblador/react-native-vector-icons/issues/1183#issuecomment-724909807, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJP3IQDONSMM5UOJGGBFX3SPGGMFANCNFSM4NX5SBVQ .
Was ripping my hair out, this worked, thanks!
I figured it out. In expo bare workflow you need to manually import the fonts with expo-font. Two days down the drain because of that...🤦🏻♂️ Thanks for replying though! … On Tue, 10 Nov 2020, 20:15 Joe Gornick, @.***> wrote: Sorry @robclouth https://github.com/robclouth and @ReeVicente https://github.com/ReeVicente, the only help I can provide is in the solution I included above by specifying the iconFonsDir and applying the fonts.gradle. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#1183 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJP3IQDONSMM5UOJGGBFX3SPGGMFANCNFSM4NX5SBVQ .
How did you do that, please?