{"size": 858, "ext": "js", "max_stars_repo_path": "lib/bundler/support.js", "max_stars_repo_name": "kiurchv/frontend", "max_stars_repo_stars_event_min_datetime": "2017-05-19T08:04:55.000Z", "max_stars_repo_stars_event_max_datetime": "2020-02-19T10:39:20.000Z", "max_issues_repo_path": "lib/bundler/support.js", "max_issues_repo_name": "kiurchv/frontend", "max_issues_repo_issues_event_min_datetime": "2016-06-11T23:32:43.000Z", "max_issues_repo_issues_event_max_datetime": "2016-06-27T02:15:11.000Z", "max_forks_repo_path": "lib/bundler/support.js", "max_forks_repo_name": "kiurchv/frontend", "max_forks_repo_forks_event_min_datetime": "2016-07-05T14:33:16.000Z", "max_forks_repo_forks_event_max_datetime": "2019-10-09T08:13:50.000Z"}
{"max_stars_count": 3, "max_issues_count": 5, "max_forks_count": 2, "avg_line_length": 28.6, "max_line_length": 80, "alphanum_fraction": 0.6841491841}
export const WEBPACK_STATS = Object.freeze({
  colors: true,
  assets: false,
  chunkModules: false,
  children: false
});

export function registerCompiler(moduleDescriptor) {
  if (!moduleDescriptor) return Promise.resolve();

  if (typeof moduleDescriptor === "string") {
    return System.import(moduleDescriptor);
  } else if (!Array.isArray(moduleDescriptor)) {
    return System.import(moduleDescriptor.module)
      .then(m => { typeof m === "function" && moduleDescriptor.register(m) });
  } else {
    return new Promise((resolve, reject) => {
      if (!moduleDescriptor.length) return reject();

      registerCompiler(moduleDescriptor[0])
        .then(resolve)
        .catch(() => registerCompiler(moduleDescriptor.slice(1)).then(resolve));
    });
  }
}

export function logger(error, stats) {
  console.log(stats.toString(WEBPACK_STATS));
}
