jsonmaur / jumpsuit

MIT License
1.39k stars 74 forks source link

root.js doesn't export anything #95

Open lukebarnard1 opened 7 years ago

lukebarnard1 commented 7 years ago

When I used create-react-app and followed the instructions here, I found:

Failed to compile.

./src/index.js
4:15-20 "export 'default' (imported as 'index') was not found in './root'

Exporting something sounded like a good idea so I did #94, which seemed to remedy things!

(although I'm not sure HMR is working or whether this is an unrelated problem)

joanfont commented 7 years ago

I had the same problem and I solved it just importing the entire file. When this was solved, Hot Module Reloading just broke.

My index.js looks like this:

import { Rerender } from 'jumpsuit'

import './root'

if (module.hot) {
  module.hot.accept('./root', Rerender)
}
joanfont commented 7 years ago

@lukebarnard1 I made HSR work again. I just had to freeze react and react-dom to 15.4.2 version, and react-scripts version to 0.8.5. If I installed last version of react-scripts, an incompatible version of react and react-dom was installed.

This is a temporary solution to make my development more easy. Soon I'll investigate how this happened.

Hope it well be useful to you.