
Angular 2 Cookbook
By :

So far, this has been a much cleaner implementation, but you still have the two dangling shims inside the index.html
file. You've pared down index.html
such that it is now requesting only a handful of JS files instead of each module target individually, but you can go even further and bundle all the JS files into a single file.
The challenge in this is that browser shims aren't delivered via modules; in other words, there aren't any other files that will import these to use them. They just assume their use is available. Therefore, the standard Webpack bundling won't pick up these targets and include them in the bundled file.
The code, links, and a live example of this are available at http://ngcookbook.herokuapp.com/7479/.
You should complete the Migrating the minimum viable application to Webpack bundling recipe first, which will give you all the source files needed for this recipe.
There are a number of ways to...