micro-template-loader
Version:
A webpack loader which pre-compiles John Resig's micro-templates
29 lines (20 loc) • 610 B
Markdown
# micro-template loader [][npm]
## Usage
[Documentation: Using loaders](http://webpack.github.io/docs/using-loaders.html)
### Simple API
``` javascript
require("micro-template!./file.html");
```
## Recommended configuration
You should be able to safely pass all your HTML files through micro-template
even if your templates don't have any `<% %>` tags.
``` javascript
{
module: {
loaders: [
{ test: /\.html$/, loader: "micro-template" }
]
}
}
```
[npm]: https://www.npmjs.org/package/micro-template-loader