Modules: execute deps, modify, execute (was Re: ES Modules: suggestions for improvement)
James Burke
jrburke at gmail.com
Wed Jun 27 11:59:01 PDT 2012
On Wed, Jun 27, 2012 at 11:40 AM, Jussi Kalliokoski
<jussi.kalliokoski at gmail.com> wrote:
> This brings up an interesting point about the modules, that being lazy
> loading. One appealing reason to use a module loader instead of just
> concatenating the scripts or using multiple script tags is that you can do
> feature detection and load polyfills for things you need instead of just
> forcing the client to download all the polyfills, regardless of whether they
> need them or not. Does the modules proposal attempt to solve this in any
> way?
You may be able construct something with the Module Loaders API, but
nothing by default, so it would mean shipping a library to enable it.
I prefer built in support for loader plugins a la AMD though.
If you want to explore that further, I suggest starting a different
thread. I prefer this thread to be very targeted on the
eval/modify/eval approach. The code examples I had in my original
message were to give context on that approach.
James
More information about the es-discuss
mailing list