This epic is the implementation of the minimal production loader RFC.
Execute bundles loaded in any order (using script async).
Allow for some type of runtime plugins. This is mostly (and perhaps only) for CSS, so that's the target.
The loader should not be any larger than the one provided by webpack.
The loader should be broken up by feature set to minimize size. For example there might be a loader.js that does the main loader stuff, and then a progressive.js which adds the ability to support steal.import, and then a plugin.js which adds the ability for plugins to exist. The build process would determine which features are needed and combine loader.js, progressive.js, and plugin.js.
As this is a rather large project this issue needs to be broken up into several tasks.
Create an internal api that can be used within steal-tools, maybe slim(options).
Assume (at first) that it is a single main with no bundles. It should receive a bundle object, it will add a bundle before and after it (before is the loader shim, after is an end part).
Allow more than 1 bundle to be passed in, this will mean that there's a split, so add more code to the shim to progressively load the non-main bundles.
Allow an option like plugin: true. This will add the plugin capability to the loader. So things like the css plugin can do stuff.
Use of steal-specific modules like @loader or @steal. We can probably just hardcode these for now.
Note, slim is the codename, it won't be used in the api, this is just for demonstration purposes.
Note that we should create a minor branch off of master and put changes into that branch.