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

Problem with react-native-icons-vector #15

Closed ximet closed 7 years ago

ximet commented 7 years ago

After run: npm run web, I have problem:

ERROR in ./~/react-native-vector-icons/lib/create-icon-set.js Module parse failed: /Users/myName/Project/MyProject/node_modules/react-native-vector-icons/lib/create-icon-set.js Unexpected token (37:21) You may need an appropriate loader to handle this file type. |

My webpack config for loader icons: { test : /\.(ttf|eot|svg|woff(2)?)(\?[a-z0-9-=&.]+)?$/, loader : 'file-loader', include: path.resolve(__dirname, "node_modules/react-native-vector-icons") },

P.S. I'm using webpack 2.2.0 version

amoghbanta commented 7 years ago

hey @ximet, you might need to parse react-native-vector-icons in your webpack config.

 {
                test: /\.js$/,
                exclude: /node_modules\/(?!(react-native-elements|react-native-vector-icons)\/).*/,
                loader: 'babel-loader'
  }

Something like this would do the job. Sorry for the late reply, I hope you would have figured it by now. This is for guys who might be facing the same issue.

ximet commented 7 years ago

@amoghbanta Thank you! I had resolved already this issue

raimens commented 6 years ago

Hi, sorry but I'm a little stuck here, I included this on Webpack, no error, but any icon are been displayed, only a square. Do I need to do any other change on code?