Closed lencioni closed 8 years ago
This is probably not super urgent, but I think it makes sense. It does introduce a bit of complexity keeping the two import variants apart, and getting the const
case right might be tricky. Right now there are no dependencies amongst import statements, and introducing such will likely lead to some tricky complexity. I could see a first version where we treat the import
variant separate in these cases.
Yeah, I think it would be just fine to start by adding support for the import
case and punting on the const
/let
/var
case for now.
Currently, with
aliases
configuration like the following:importing both
React
andPropTypes
will result in:but it would be better if it instead resulted in:
I'm not sure if there is any equivalent syntax for CommonJS imports, but it would be really nice if ImportJS did this when using the
import
declaration keyword. I suppose if you were using CommonJS, it would be better to have onerequire
and one assignment after the fact than tworequire
s: