continuation from: https://gist.github.com/mikermcneil/f1294b34f89f9ee9f392
After spending a decent amount of time working on a new approach for bundling and automatically injecting references into the HTML, a few problems started presenting themselves. First of all, declaring glob patterns inline with a tag limits our flexibility. It makes it difficult (impossible?) to bundle files from multiple directories. It also becomes difficult (impossible?) to specify the order of scripts if needed.
Also, injecting files from pipeline.js becomes difficult as we don't really know where to put files if multiple blocks exist.
I spend a fair amount of time working in ASP.NET, and I think we can possibly borrow some of their ideas for bundling and injecting scripts onto the page. I think we could repurpose pipleine.js - possibly rename it bundles.js - to contain data about resource bundles. See code below for examples.