I'm messing around with a generic way to do hot-module-replacement with generic web components whether they be vanilla, or done in a framework like Polymer or Skate.
The idea is that you call hmr(customElementConstructor)
in your module files and it will set up the proper hooks.
The const filename
should be inserted at build time so that it can remember the original localName
of the component for the module.