rrdelaney / reason-scripts

:beginner: Create a ReasonML and React development environment
MIT License
628 stars 58 forks source link

Default import not working? #67

Closed justgage closed 6 years ago

justgage commented 6 years ago

What I'm trying to do:

I'm taking an exisiting create-react-app project that I've added bsb into and has been working so far. I just run bsb along side the JS server. However I found it hard to get Jest to work properly so I was trying to switch to this. It seemed like it would be a better experience overall.

What is happening

When I try to do a react-scripts start on the project I get this:

image

Any idea what might be causing this? It seems to complain on default imports everywhere which we use a lot of.

justgage commented 6 years ago

I think I found the source of the problem. It seems in this configuration if a file doesn't have a jsx extension then it defaults to the reason file with the same name. I have a lot of this because I'm converting things to Reason.

This makes sense if you're starting a project but does make it harder to convert normal CRA apps over πŸ€•

rrdelaney commented 6 years ago

This was configured so we can support in-source without the .bs extension πŸ˜• I don’t really see a way to reconcile your problem and supporting that, sorry πŸ˜”

justgage commented 6 years ago

That's fair, I just did the grunt work and added a bunch of .js extensions to my imports. NBD