Open thescientist13 opened 6 years ago
So that developers can use something like
import { html, render } from 'lit-html'; import template from './foo.html'; // import our template from a file import css from './foo.css'; class Foo extends HTMLElement { constructor() { super(); this.root = this.attachShadow({ mode: 'closed' }); render(this.template(), this.root); } template() { return html` <style> ${css} </style> ${template} // render our import `; } } customElements.define('foo', Foo);
or something similar, making sure to take variable interpolation into account.
maybe a combination of to-string-loader!html-loader with webpack?
to-string-loader!html-loader
So that developers can use something like
or something similar, making sure to take variable interpolation into account.