Closed ximet closed 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.
@amoghbanta Thank you! I had resolved already this issue
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?
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