dot-tpl-loader

dot template loader with query options for webpack

Usage no npm install needed!

<script type="module">
  import dotTplLoader from 'https://cdn.skypack.dev/dot-tpl-loader';
</script>

README

Usage

var template = require("./file.tpl");

var html = template(data);
// or
var html = template.render(data);

Recommended config

module.exports = {
  module: {
    loaders: [
      { test: /\.tpl$/, loader: "dot-tpl?append=true" }
    ]
  }
};