function createLoadFilesCode(cfg, polyfills) {
    const loadFilesFunction = createLoadFilesFunction(cfg);
    // create a separate loadFiles to be run after polyfills
    if (polyfills && polyfills.length > 0) {
        return `
  function loadFiles() {
    ${loadFilesFunction}
  }

  if (polyfills.length) {
    Promise.all(polyfills).then(loadFiles);
  } else {
    loadFiles();
  }`;
    }
    // there are no polyfills, load entries straight away
    return `${loadFilesFunction}`;
}
/**
 * Creates js code which waits for polyfills if applicable, and executes
 * the code which loads entrypoints.
 */
Creates js code which waits for polyfills if applicable, and executes
the code which loads entrypoints.
Creates js code which waits for polyfills if applicable and executes the code which loads entrypoints .
function createLoadFilesCode(cfg, polyfills) {
    const loadFilesFunction = createLoadFilesFunction(cfg);
    if (polyfills && polyfills.length > 0) {
        return `
  function loadFiles() {
    ${loadFilesFunction}
  }
  if (polyfills.length) {
    Promise.all(polyfills).then(loadFiles);
  } else {
    loadFiles();
  }`;
    }
    return `${loadFilesFunction}`;
}
function createLoadFilesCode ( cfg , polyfills ) { const loadFilesFunction = createLoadFilesFunction ( cfg ) ; if ( polyfills && polyfills . length > 0 ) { return ` ${ loadFilesFunction } ` ; } return ` ${ loadFilesFunction } ` ; }
Creates js code which waits for polyfills if applicable, and executes
 the code which loads entrypoints.
Creates js code which waits for polyfills if applicable and executes the code which loads entrypoints .
// create a separate loadFiles to be run after polyfills // there are no polyfills, load entries straight away