# micro-tpl-loader

> Micro mustache template loader for webpack

Latest version **0.1.0** (published 2021-12-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install micro-tpl-loader
pnpm add micro-tpl-loader
yarn add micro-tpl-loader
bun add micro-tpl-loader
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2021-12-15 |
| First published | 2019-01-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | ^12.22.0 \|\| ^14.17.0 \|\| >=16.13.0 |
| Dependencies | 1 |
| Unpacked size | 4.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Eric Chen |
| Maintainers | airkro |
| Keywords | handlebars, html, mustache, template, tpl, webpack |

## Links

- npm: https://www.npmjs.com/package/micro-tpl-loader
- Repository: https://github.com/airkro/micro-tpl-loader
- Issues: https://github.com/airkro/micro-tpl-loader/issues
- npm.io page: https://npm.io/package/micro-tpl-loader

## Dependencies (1)

- [micromustache](https://npm.io/package/micromustache.md) ^8.0.3

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 0.1.0 (latest) — 2021-12-15
- 0.0.1 — 2019-01-16
- 0.0.0 — 2019-01-16

## README

# micro-tpl-loader

Micro mustache template loader for webpack.

[![npm][npm-badge]][npm-url]
[![github][github-badge]][github-url]
![node][node-badge]

[npm-url]: https://www.npmjs.com/package/micro-tpl-loader
[npm-badge]: https://img.shields.io/npm/v/micro-tpl-loader.svg?style=flat-square&logo=npm
[github-url]: https://github.com/airkro/micro-tpl-loader
[github-badge]: https://img.shields.io/npm/l/micro-tpl-loader.svg?style=flat-square&colorB=blue&logo=github
[node-badge]: https://img.shields.io/node/v/micro-tpl-loader.svg?style=flat-square&colorB=green&logo=node.js

Support [MicroMustache](https://www.npmjs.com/package/micromustache) interpolation. Not for `Handlebars` and `Mustache`.

## Installation

```bash
npm install micro-tpl-loader --save-dev
```

## Usage

```cjs
// example: webpack.config.cjs

const params = {
  // define params here
  foo: 'bar',
  xyz: {
    abc: 123
  }
};

module.exports = {
  module: {
    rules: [
      {
        test: /\.tpl$/,
        use: {
          loader: 'micro-tpl-loader',
          options: {
            params
          }
        }
      }
    ]
  }
};
```

```html
<!-- index.tpl -->
<div>{{ foo }}</div>
<div>{{ xyz.abc }} - test</div>

↓↓

<!-- index.html -->
<div>bar</div>
<div>123 - test</div>
```

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