@Daniel

I've never felt HTML Imports was a module loader at all. It serves a 
separate purpose loading HTML documents, but not JS modules. It feels 
appropriate to import a document that registers an element if it's all 
declared using HTML. I think Mozilla sees it as a module loader and that's 
why they took the stance of not shipping it 
https://developer.mozilla.org/en-US/docs/Web/Web_Components/HTML_Imports. I 
still hope this will change if they realize it's not a module loader, but a 
way to load external HTML assets.

Todays script tags can import ES6 modules using a polyfill for 
System.import() https://github.com/ModuleLoader/es6-module-loader. This 
would really become slick if the module tag is adopted 
https://github.com/ModuleLoader/es6-module-loader#module-tag.

One of the things I'm not clear on ES6 modules is whether they can load non 
JS assets. This is something SystemJS can do with it's plugin system 
similar to RequireJS's plugin system 
https://github.com/systemjs/systemjs#plugins.

My idea of a slick setup for an element definition would look something 
like this.

<link rel="import" href="user-view.html">


<dom-module id="main-view">
  <template>
    <user-view first="{{user.first}}" last="{{user.last}}"></user-view>
  </template>
</dom-module>


<module>
  import { Polymer } from 'bower_components/Polymer';


  Polymer({
    is: 'main-view',
    published: {
      user: Object
    }
  });
</module>

Follow Polymer on Google+: plus.google.com/107187849809354688692
--- 
You received this message because you are subscribed to the Google Groups 
"Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/polymer-dev/6c69d05f-162b-42f3-98ac-9534126c11d4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to