teambit / envs

Component development environments for the Bit community
https://bit.dev/bit/envs
Other
64 stars 9 forks source link

The React Native compiler should support JSX files #98

Closed jmporchet closed 4 years ago

jmporchet commented 4 years ago

As per our discussion on the Slack channel with @JoshK2, at the moment the react native compiler only supports *.js file extensions, not *.jsx.

It would be great to have support for these file extensions natively.

The correct Babel configuration needs to be added to make this feature.

JoshK2 commented 4 years ago

Hi @jmporchet,

I think it would be great to support jsx files, if you can share the right Babel config, it would be nice. You can also create a PR with the new Babel config for this compiler to support jsx.

jmporchet commented 4 years ago

I wouldn't know where to start looking...

JoshK2 commented 4 years ago

@jmporchet I saw how to support jsx in react-native, and it's only a little config in the metro config file, so no change needs to be done in the babel config file generated by the compiler. So, I added the support for jsx file in the compiler, you can test it from version 1.0.15. https://bit.dev/bit/envs/compilers/react-native?version=1.0.15