-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vector icon not shown in react native for web #1425
Comments
there are not enough steps or details here to warrant an issue. this should be closed |
I am running into the same issue where the icon is not displaying in RNW with the newest version of react-native-vector-icons: I have no idea if its related to what @aartigehlot is seeing. Also im not sure if this is an issue related to this library and RNW or webpack config issue. Here is the repo with the issue reproduced: https://github.com/gciluffo/react-native-web webpack.js.config:
App.tsx:
When inspecting the DOM I can see that the font-family is included: |
Hi, @gciluffo did you find any solution? I am also running into the same issue please let me know if there is any solution with this |
@Uzef1997 No. We decided to just use |
To use react-native-vector-icons with react-native-webwebpack.js.config:I have commented "ADD THIS LINE HERE" where you need to add a line
index.web.js:
After that, just restart webpack and you're done |
After applying above mentioned solution i got this error when i do npm run web |
Make sure react-native-vector-icons is installed, if it is installed then try deleting node_modules, package-lock.json, and then run
|
Thank you for helping I tried this solution vector icons were already installed and i deleted node modules and package-lock file but got error the same error but this time I am putting here all the info related to error so that i might get some help. **ERROR in ./index.web.js 1:266-321 Here is my webpack.config.js
|
It's probably because of this
Because you added an alias for react-native-vector-icons, when you import react-native-vector-icons, it'll use the alias react-native-vector-icons/dist // This is where Ionicons.ttf exists
import Ionicons from 'react-native-vector-icons/Fonts/Ionicons.ttf';
// Because of the alias, this is where it tries to load it from. Ionicons.ttf does not exist at this path
import Ionicons from 'react-native-vector-icons/dist/Fonts/Ionicons.ttf'; |
Environment
Description
Describe your issue in detail. Include screenshots if needed.
Demo
You can use https://snack.expo.io/ to create a demo that can help users to better understand your problem.
The text was updated successfully, but these errors were encountered: