Modularity: ES6 modules vs. HTML imports vs. asm.js
With Web Components, we also get HTML Imports . This seems like yet another modularity construct on the web. Would it make sense to coordinate this with ES6 modules? I’m also hoping/assuming that asm.js will eventually use ES6 modules(?)
Re: Modularity: ES6 modules vs. HTML imports vs. asm.js
HTML imports are importing HTML, not JS. Coordination is always good, but I don't know what that would entail here.
Will it be possible to ensure that HTML imports can allow the specific ES6 loader to be specified (just as I asked about script tags in my previous post)?
HTML imports using ES6 modules makes a lot of sense, because script tag duplication causes unnecessary script re-execution otherwise (imagine jquery being a <script> tag on many imports - if it is an imported module its code is executed only once).
So the main issue I'm worried about is that there needs to be some way to indicate that a custom loader should be used all the way down the import tree.
I started a conversation with Rafael Weinstein last week about the possibility of integrating these systems. I believe that it is possible and desirable, but there are many open questions to answer still.
It will be easier to begin the discussion seriously once the Loader API is entirely specified, imho.
Yehuda Katz (ph) 718.877.1325
On Sat, Jun 8, 2013 at 7:33 AM, Sam Tobin-Hochstadt <[hidden email]> wrote:
HTML imports are importing HTML, not JS. Coordination is always good,
but I don't know what that would entail here.
asm.js modules have some specific needs, and it may or may not be able
to use ES6 modules. I'll let Dave speak to that.