html-to-template-loader
v1.0.3
Published
Simple loader to load html as content of template element
Downloads
88
Readme
<html>
to <template>
webpack loader
Create template from static html files with inline styles.
Make <web-components>
instead of <iframes>
!
Installation
Install with npm
npm install --save-dev html-to-template-loader
Usage
Import html to use in your custom element:
import templateHTML from 'html-to-template-loader!../html/banner.html';
const template = document.createElement('template');
template.innerHTML = templateHTML;
export class TopBanner extends HTMLElement {
constructor () {
// use your template...
}
}
To Do
- auto generate base64 from paths to local images
- auto generate base64 from paths to localc fonts