react-scripts打包react-native-web应用关于react-native-vector-icons报错experimental syntax ‘jsx‘

利用react-native-app打包react-native-web项目,使用react-srcipt打包时,社区Icon组件react-native-vector-icons打包报错

Compiled with problems:

×

ERROR in ./node_modules/react-native-vector-icons/lib/create-icon-set.js

Module build failed (from ./node_modules/babel-loader/lib/index.js): SyntaxError: C:\*****\node_modules\react-native-vector-icons\lib\create-icon-set.js: Support for the experimental syntax 'jsx' isn't currently enabled (70:9): 68 | 69 | return ( > 70 | <Text selectable={false} {...props}> | ^ 71 | {glyph} 72 | {children} 73 | </Text> Add @babel/preset-react (https://github.com/babel/babel/tree/main/packages/babel-preset-react) to the 'presets' section of your Babel config to enable transformation. If you want to leave it as-is, add @babel/plugin-syntax-jsx (https://github.com/b

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值