react-everywhere / re-start

react-native template to target multiple platforms :globe_with_meridians: :iphone: :computer: with single codebase.
https://medium.com/@amoghbanta/write-once-use-everywhere-with-react-native-d6e575efe58e#.nfl50gwfg
MIT License
1.3k stars 85 forks source link

react-native-vector-icons not working on web #47

Open HeaDBanGer84 opened 6 years ago

HeaDBanGer84 commented 6 years ago

Enviroment:

Step 3: Describe the problem (try to include screenshots):

Try to include react-native-vector-items, which works pretty well on android, but not on the web. Seems that the fonts are not bundled correctly with the webpack.config (neither Production nor dev). I searched my ass up to find the configs in the react-scripts module and try to added the needed loader but didn't work. Your template is really awesome so perhaps you guys could help me/fix this, because you mentioned rnvi on your readme and i think it is a very usefull asset lib.

Steps to reproduce:

  1. create a new project, as discribed in Readme.md
  2. yarn add react-native-vector-icons
  3. added an icon in TopLevelScreenComponent.js
    //...
    import Icon from 'react-native-vector-icons/dist/MaterialIcons';
    ...
    render() {
    //...
    <Icon.Button name = "image"
                 backgroundColor = "#a41010"
                 onPress = {this.props.failDispatchedAction} >Test Icon Button </Icon.Button>
    //...  

    Observed Results:

no errors just the font could not be loaded (on web...on android ...perfect)

Expected Results:

a button with an icon

HeaDBanGer84 commented 6 years ago

bildschirmfoto von 2017-11-17 10-38-42 some screenshot

raimens commented 6 years ago

I'm struggling with too :( :( :( or may I can say stuck