tc39 / proposal-dynamic-import

import() proposal for JavaScript
https://tc39.github.io/proposal-dynamic-import/
MIT License
1.87k stars 47 forks source link

Multiple imports #54

Closed slanted closed 7 years ago

slanted commented 7 years ago

Forgive me if I missed something. But is there a provision for multiple imports / promises for this?

i.e. import(['module1', 'module2']).then(function(module1, module2) {

});

Been using something like this since jspm/systemjs and requirejs and I always see ugly Promise.all solutions which are some heinous syntax that I hope doesn't make it into the proposal. A little sugar would be great.

domenic commented 7 years ago

No, Promise.all is the way to wait for multiple things in parallel in JavaScript and we have no intentions of moving away from that.