Skip to content

Why do React Native packages compile with SyntaxError: "Support for the experimental syntax 'jsx' isn't currently enabled"? #2470

Closed Answered by necolas
restarajat asked this question in Help
Discussion options

You must be logged in to vote

There's a comment on L15 of your webpack config that says "Add every directory that needs to be compiled by Babel..." And before that is a comment block with more explanations. And the error messages you're getting are telling you the same thing. But you haven't added any RN packages to your babel loader config which is why the modules still have JSX syntax in them.

If after reading documentation you still have problems configuring your bundler, I suggest using Expo which will take care of this work out-of-the-box.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by necolas
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
3 participants