> 1. Is it possible to import parts of a module to avoid potentially large 
> network payloads?

Not parts of a module, no. (The semantics of this would be incredibly hairy and 
hard to define.) But you can dynamically load modules, so you can write code 
that decides dynamically when to load modules.

> 2. Is there syntax that would allow the server to group or concatenate 
> delivery of multiple modules within one request?

Since modules can be nested, you can certainly put multiple modules in a file; 
grouping them in a single module is nothing more than namespace management. So 
you can write:

    // file1.js
    module A { ... }
    module B { ... }
    ...
    module Z { ... }

    // client.html
    <script type="harmony">
        module MyLib = load "file1.js";
    </script>

or with HTML support, something like:

    // client.html
    <script type="harmony" module="MyLib" src="file1.js"></script>

Dave

_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to