I am getting following error when running on web
in ./node_modules/react-native-vector-icons/lib/create-icon-set.js
Module parse failed: Unexpected token (35:21)
You may need an appropriate loader to handle this file type.
|
| class Icon extends PureComponent {
| static propTypes = {
| name: IconNamePropType,
| size: PropTypes.number,
@ ./node_modules/react-native-vector-icons/FontAwesome.js 6:0-50
@ ./dist/src/FontAwesomeIcons/bluerain-plugin-vector-iconsFontAwesome-web.js
@ ./dist/src/FontAwesomeIcons/index.js
@ ./bluerain.js
@ ./.storybook/config.js
@ multi ./node_modules/@storybook/react/dist/server/config/polyfills.js ./node_modules/@storybook/react/dist/server/config/globals.js (webpack)-hot-middleware/client.js?reload=true ./.storybook/config.js
Like most react-native packages used for the web, you need to take care of the transpilation yourself. See https://github.com/necolas/react-native-web/blob/master/website/guides/getting-started.md#web-packaging-for-existing-react-native-apps
@MoOx I am facing same error even after adding webpack configuration provided by you in above comment in my project.can you please take a look on my github repo.
https://github.com/BlueEastCode/bluerain-plugin-vector-icons/tree/feature/plugin
steps to reproduce issue:
1 clone project
2: git fetch origin
3:git checkout feature/plugin
4: npm i
5: npm run storybook
it will run on port localhost:6006 on browser
I am using it in react-storybook.I have added webpack configurations in webpack.config.js file in storybook folder.
I am having the exact same issue, using webpack and following the docs exactly as written
Same here, any solution?
I am also facing the same issue,need help!!
Same here, any solution?