@Eric

I think a big question that you asked is if the module loader can load non 
js, I think that is a very important question. 

Another problem is that in your example you have
import { Polymer } from 'bower_components/Polymer';
which could also be written as
<link rel="import" href="bower_components/Polymer/polymer.html">
and this is where the confusion comes, why two different ways to load 
assets, what I would like to have would be one way to load all assets. 
 Html imports are ok, but if the ES6 module loader can load and manage all 
assets then wouldn't it be better to not use Html Imports.  Html Imports is 
simple so maybe we keep it for simple cases, but the module loader does not 
need to be complicated either.

I would rather see a unified standard for loading assets implemented across 
all browsers and was hoping ES6 module loader might be that solution maybe 
it will evolve to that.

When it comes to Polymer if we use html imports which brings in our js 
files as well, then I guess we don't need to use module loader, but I can 
see this getting very ugly if an app uses part module loader part html 
imports.  Also the de-duping feature is not very robust, just having two 
jquery files from two different cdn's in two different web components 
defeats the de-dup feature. 







On Sunday, February 22, 2015 at 10:03:05 PM UTC-5, Erik Ringsmuth wrote:
>
> @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/b33e7899-593e-4030-be0a-7afe8614691c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to