admin管理员组文章数量:1401193
I want to integrate the QR code scanner feature in my react-native-based applications.
so I am installing the react-native-vision-camera package.
According to documentation, I have to add globals __scanQRCodes
inside babel.config.js
globals: ['__scanQRCodes']
But after adding globals __scanQRCodes
inside babel.config.js
.
I got BABEL TRANSFORM ERROR
.globals is not a valid Plugin property
I want to integrate the QR code scanner feature in my react-native-based applications.
so I am installing the react-native-vision-camera package.
According to documentation, I have to add globals __scanQRCodes
inside babel.config.js
globals: ['__scanQRCodes']
But after adding globals __scanQRCodes
inside babel.config.js
.
I got BABEL TRANSFORM ERROR
.globals is not a valid Plugin property
2 Answers
Reset to default 7we need to define the array as shown in the image below, you miss the square brackets like this:
plugins: [
[
'react-native-reanimated/plugin',
{ globals: ['__scanQRCodes'] }
]
]
see this image for proper understand
We need to do this 2 modifications:
plugins: [
[
'react-native-reanimated/plugin',
{ globals: ['__scanCodes'] },
],
]
And finally:
npx react-native start --reset-cache
本文标签: javascriptglobals is not a valid Plugin propertyStack Overflow
版权声明:本文标题:javascript - .globals is not a valid Plugin property - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744238441a2596669.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论