jorendorff / js-loaders

Pseudoimplementation of the proposed ES6 module loaders.
54 stars 7 forks source link

System loader load multiple modules #73

Open guybedford opened 10 years ago

guybedford commented 10 years ago

It is still a very key use case to be able to easily load more than two modules at the same time.

According to the current spec, loading two modules would involve:

  Promise.all(
    System.import('moduleA'), 
    System.import('moduleB')
  ).then(function(moduleA, moduleB) {
  }, function(err) {
  });

Is it not simpler for this to be:

  System.import(['moduleA', 'moduleB'], function(moduleA, moduleB) {
  }, function(err) {
  });
jorendorff commented 10 years ago

@dherman says: We removed it because of Promise.all, but you're right, it's pretty verbose :(

Definitely could change. @dherman is taking this issue.