aruntk / wc-loader

:toilet: Webcomponents webpack loader.
MIT License
99 stars 17 forks source link

hmr #2

Open aruntk opened 7 years ago

aruntk commented 7 years ago

unregister component feature might be needed. https://github.com/w3c/webcomponents/issues/152

aruntk commented 7 years ago

https://www.w3.org/TR/custom-elements/#custom-elements-upgrades-examples

aitoroses commented 7 years ago

Hi @aruntk, can you give me some insight with something?

I'm the mantainer of a similar loader but instead of using parse5, it directly uses vulcanize. I encountered the same problem with the downgrading of custom elements.

If you have resolved it (the README file points it out) could you explain me how did you done it?

aruntk commented 7 years ago

@aitoroses Hot code reload works now(reload on element file change). I'vent yet figured out how to implement hot module reload. I think as of now it is not possible to implement a complete element = module re-rendering since there is no way to unregister a custom element (afaik). Instead what I'm trying to implement is a partial re-rendering (functions, inner html and property values). I hope it'll lead to a near complete re-rendering. To implement this I might be using https://github.com/Polymer/polymer-analyzer.