"jsx isn't enabled" error when using a Gatsby theme #30342
Unanswered
dungle-scrubs
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm developing at Gatsby theme and everything works great within Yarn Workspaces. However as soon as I plug the theme into a Gatsby site, I get the error:
I've read that out of the box, Gatsby doesn't need anything special and should just handle everything, so there's no immediate need for
gatsby-preset-babel
, unless you need to change something.I've also read that
gatsby-preset-babel
excludesnode_modules
by default. In this case it would make sense because the error is coming from jsx within the Gatsby theme itself, not the Gatsby site.Assuming I'm correct about the issue, how can I get Babel to transpile jsx inside a Gatsby theme within
node_modules
?Here's my test site's repo
Beta Was this translation helpful? Give feedback.
All reactions