appendPreloadScript = href => {
    if (localConfig.entries.type === 'module') {
      append(head, createElement('link', { rel: 'modulepreload', href, as: 'script' }));
    } else {
      append(head, createElement('link', { rel: 'preload', href, as: 'script' }));
    }
  }
Check whether we need add a special loader script, or if we can load app
code directly with a script tag. A loader is needed when:
- We need to load polyfills conditonally
- We are loading system, which can't be loaded with a script tag
- We have a legacy build, so we need to conditionally load either modern or legacy