# blueimp-tmpl-loader

> blueimp templates loader for webpack

Latest version **0.0.3** (published 2015-06-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install blueimp-tmpl-loader
pnpm add blueimp-tmpl-loader
yarn add blueimp-tmpl-loader
bun add blueimp-tmpl-loader
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2015-06-03 |
| First published | 2015-06-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 (+2 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Jan Nicklas |
| Maintainers | jantimon |
| Keywords | blueimp, blueimp-tmpl, webpack, loader, template |

## Links

- npm: https://www.npmjs.com/package/blueimp-tmpl-loader
- Repository: https://github.com/jantimon/blueimp-tmpl-loader
- Homepage: https://github.com/jantimon/blueimp-tmpl-loader#readme
- Issues: https://github.com/jantimon/blueimp-tmpl-loader/issues
- npm.io page: https://npm.io/package/blueimp-tmpl-loader

## Dependencies (3)

- [blueimp-tmpl](https://npm.io/package/blueimp-tmpl.md) ^2.5.4
- [loader-utils](https://npm.io/package/loader-utils.md) ^0.2.9
- [html-minifier](https://npm.io/package/html-minifier.md) ^0.7.0

## Alternatives

- [raw-loader](https://npm.io/package/raw-loader.md) — 4.3M weekly downloads
- [plop](https://npm.io/package/plop.md) — 1.4M weekly downloads
- [webpack-deadcode-plugin](https://npm.io/package/webpack-deadcode-plugin.md) — 80.3K weekly downloads
- [@storybook/preact-vite](https://npm.io/package/@storybook/preact-vite.md) — 54.2K weekly downloads
- [vite-plugin-transform](https://npm.io/package/vite-plugin-transform.md) — 2.4K weekly downloads

## Recent versions

- 0.0.3 (latest) — 2015-06-03
- 0.0.2 — 2015-06-03
- 0.0.1 — 2015-06-02

## README

# blueimp template loader for webpack
[![Build Status](https://secure.travis-ci.org/jantimon/blueimp-tmpl-loader.svg?branch=master)](http://travis-ci.org/jantimon/blueimp-tmpl-loader)  [![Dependency Status](https://david-dm.org/jantimon/blueimp-tmpl-loader.svg)](https://david-dm.org/jantimon/blueimp-tmpl-loader)

[blueimp](https://blueimp.github.io/JavaScript-Templates/) template loader for [webpack](http://webpack.github.io/).
Compile templates and allows minification

## Installation

`npm install blueimp-tmpl-loader --save-dev`

## Usage

[Documentation: Using loaders](http://webpack.github.io/docs/using-loaders.html)

``` javascript
var template = require("blueimp-tmpl!./file.html");
// => returns the template function compiled with the tmpl templating engine.

// And then use it somewhere in your code
template(data) // Pass object with data
```

Alternatively you can also define blueimp-tmpl in your webpack.config file:

``` javascript
  {
    module: {
      loaders: [
        { test: "\.tpl.html$", loader: "blueimp-tmpl" },
      ]}
  }
```

``` javascript
  var template = require('./file.tpl.html');
```

The blueimp-tmpl loader allows you to **minify** the html before compiling by setting a loader query string

``` javascript
  {
    module: {
      loaders: [
        { test: "\.tpl.html$", loader: "html-tpl?minimize=true" }
      ]
  }

```

## Tests

[![Build Status](https://secure.travis-ci.org/jantimon/blueimp-tmpl-loader.svg?branch=master)](http://travis-ci.org/jantimon/blueimp-tmpl-loader)

Run unit tests:

```
  npm install
  npm test
```

## Demo

http://jantimon.github.io/blueimp-tmpl-loader/

## License

MIT (http://www.opensource.org/licenses/mit-license.php)

---
_Source: https://npm.io/package/blueimp-tmpl-loader · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
