Import haml-coffee files as modules in your webpack project. Returns a template function to render the template.
Add to your webpack config module.loaders:
{ test: /\.hamlc$/, loader: "hamlc-loader" }
.template
%h1= @title
MyTemplate = require("templates/my_template.hamlc")
MyTemplate({title: 'Go Boundless!'})
will return the HTML:
<div class="template">
<h1>Go Boundless!</h1>
</div>