jamesknelson / starter-kit

Project boilerplate using React, Redux and Uniloc
http://unicornstandard.com/packages/boilerplate.html
462 stars 42 forks source link

A question #6

Closed reintroducing closed 8 years ago

reintroducing commented 8 years ago

I apologize for leaving this here but I wasn't sure how to best get in contact with you.

I'm looking over this repo and I've followed some of your prior guides to upgrading to Babel 6+. I just did this upgrade on our code base and I'm running into an import issue. Basically we export our React (and other ES6 modules) as such:

export default Foo;

Then, we would import them as such:

import Foo from 'foo';

This all worked fine in Babel <6 but after the upgrade I see my objects as as having a default property and the actual object being exported is in that property. This causes me to have to change EVERY import in our codebase to:

import {default as Foo} from 'foo';

In looking at your code in this repo I see you're doing none of that. Do I really need to go through and change all my imports like this and moving forward have that be the proper way of importing my modules or am I missing something larger here?

Thanks for any time you take responding to this. You're not obligated but I do appreciate any help you could offer.

reintroducing commented 8 years ago

I just wanted to follow up and say this only seems to be an issue when using Babel and requiring ES6 modules inside of ES5 modules. Just now made that realization, sorry for the noise :\