The problem is when I import some react-native-xxx package, as react-native-vecttor-icons, for example, that is not compiled to ES5, or, for example, use ClassProperties, an error occurs.
In react-native-cli, these modules are transpiled automatically with babel.
Wich configuration should I use to get the same behavior in a web project?
@rafeca, thanks for this metro-sample-app.
I'm trying to use it with react-native-web, I am using the following
metro.config.js
In order to get the extension
.web.js
to work in dev mode, I also changed thedev.html
to:adding
?platform=web
at the and of the link.The problem is when I import some react-native-xxx package, as react-native-vecttor-icons, for example, that is not compiled to ES5, or, for example, use ClassProperties, an error occurs. In react-native-cli, these modules are transpiled automatically with babel. Wich configuration should I use to get the same behavior in a web project?