code: function setHtmlTemplate(config) {
    const DEFAULT_TEMPLATE = join(REACT_ENTRY_DIR, 'index.html')
    const CUSTOM_TEMPLATE = join(PROJECT_SRC_DIR, 'index.html')
  
    let templatePath = existsSync(CUSTOM_TEMPLATE)
      ? CUSTOM_TEMPLATE
      : DEFAULT_TEMPLATE
  
    let cdnScripts = []
    for (let {cdn} of externals) {
      if (typeof cdn === 'string') {
        cdnScripts.push(cdn)
        continue
      }
  
      if (Array.isArray(cdn)) {
        cdnScripts = [
          ...cdnScripts,
          ...cdn,
        ]
        continue
      }
  
      let {development, production} = cdn
      if (isProduction())
        cdnScripts.push(production)
      else
        cdnScripts.push(development)
    }
  
    config.plugins.push(new Html({
      alwaysWriteToDisk: borela === 'serve',
      head: {
        appendScripts: cdnScripts,
      },
      minify: minify || minifyHtml,
      templatePath,
    }))
  }
docs: Check if there’s a custom HTML template for the app and if none is found, use
  the default one. The custom template  might be useful if the programmer wants
  to add extra information on the header without having to wait for react to
  load.