Skip to content

jsxImportSource does not work with nextjs 12.0.8 and react 17 #2093

Answered by daniellin215
daniellin215 asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @hasparus , thanks for the example. It looks like I have theme-ui and not @theme-ui/core in my package.json. After I uninstalled theme-ui and followed your setup, specifically the addition of "jsx": "preserve", "jsxImportSource": "@theme-ui/core" worked! (i did not have to have /** @jsxImportSource theme-ui */ at the beginning of each file that uses sx. However, without theme-ui, I am not able to import and use some components such as Box etc.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@hasparus
Comment options

Answer selected by lachlanjc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants