The TestingArchitectHost registers the builders only using their name,
ignoring the package name. Later, when Architect looks up the builder
using the host, it's unable to find it.
You can find a reproduction
[here](https://github.com/mgechev/cli-builders-demo).
We need to consider the name when deduping files because a file such as `runtime.js` can be under multiples names because this file is a dependency of multiple entrypoints
With this change we turn on differential loading for projects that has es2015 as script target and still want to support browsers which that don't support ES2015.
Supported browsers are defined in the browserlist file.
This change wires up the index generation for multiple bundles, we however don't enable differential loading for users just yet. As this will be done in a separate PR to change over specs to conform with the new files
Since when having differential loading we already know which files originated from which build. We shouldn't need to merge and transform this data.
With this change, the index generator accepts a couple of new inputs.
1. `files` - used for Js and CSS files which require nomodule nor module attributes
2. `moduleFiles` - Js files that need to have a `module` attribute
3. `noModuleFiles` - Js files that need to have a `nomodule` attribute
4. `entrypoints` - used to sort the insertion of files in the HTML file
Entrypoints might have other files associate with them such as runtime.js, it is is paramount to keep the relation between them especially when this result is needed to generate an index file
This PR adds differential loading to the browser builder. First, it checks if differential loading is needed. This is the case if the compilation target is ES2015 while the browserslist points to ES5 browsers.
For providing differential loading, it calls the methods for creating the webpack config for each compilation target (e. g. ES5 and ES2015). The needed differences between those configurations are defined using parameters also added by this PR. Then it calls webpack for each of them and merges the results
This feature is currently hidden behind a flag. To activate it, set the differentialLoading flag in browser/index.ts.