Skip to content

Not possible to use JSX #305

Answered by ryansolid
nimabrownlee asked this question in Q&A
Discussion options

You must be logged in to vote

I see. The Solid Hacker News Web Component example uses the CLI but admittedly a different template but I've never had any issues in this regard.

I just did a clean install and see if I have any luck reproducing. The setup already does import out of the box between the test setup and the index importing in App.js. I had no problem importing the Box component. I tried it next to App and in nested folders and tried both .js and .jsx extensions and still had no issue.

Where are the components you are trying to import are located? I think that might be the problem. The CRA setup seems to only transpile the src folder (and nested folders). If your file is in fact in the src folder then I mean …

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

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

Answer selected by nimabrownlee
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