code: function pruneModules(bundle, doneBundles, registry, generator) {
      const {groups} = generator.options;
      groups.forEach(group => {
          const bundles = group.map(bundleId => {
              return doneBundles.find(b => b.id === bundleId);
          }).filter(Boolean);
          pruneGroup(bundles);
      });
  }
docs: First argument is not needed; just to make it look like normal generator API