metapensiero / metapensiero.pj

Javascript for refined palates: a Python 3 to ES6 Javascript translator
Other
901 stars 73 forks source link

Use default import rather than named import. #42

Closed icarito closed 6 years ago

icarito commented 6 years ago

Would this break named imports? It works well for my purpose. I don't know the details but node and webpack were importing differently unless I used this syntax.

icarito commented 6 years ago

I managed to mess up my pull request, now this one includes both this and #41 . They are related so I guess it'd be cool to close #41 and leave this one.

azazel75 commented 6 years ago

About the import, taking into account what I've written into #41 I would prefer this to be

from bar  import foo # <-- named import
from bar import __default__ as zoo <-- default import
azazel75 commented 6 years ago

I've implemented my last proposal in my master and I've updated the docs, have a look at it!