# ivy-template-loader

> Js template webpack loader

Latest version **1.1.4** (published 2020-11-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install ivy-template-loader
pnpm add ivy-template-loader
yarn add ivy-template-loader
bun add ivy-template-loader
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.4 |
| Published | 2020-11-25 |
| First published | 2017-06-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 15.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | liZhuLin |
| Maintainers | xiaojuzi1105 |
| Keywords | webpack, plugin, html, template |

## Links

- npm: https://www.npmjs.com/package/ivy-template-loader
- Repository: https://github.com/xiaojuzi1105/ivy-template-loader
- Issues: https://github.com/xiaojuzi1105/ivy-template-loader/issues
- npm.io page: https://npm.io/package/ivy-template-loader

## 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

- 1.1.4 (latest) — 2020-11-25
- 1.1.3 — 2018-04-26
- 1.1.2 — 2018-04-26
- 1.1.1 — 2017-10-24
- 1.0.1 — 2017-06-27
- 1.0.0 — 2017-06-27

## README

# ivy-template-loader
webpack template loader

模板预处理使用的是  lodash.template 机制


## Installation

`npm install ivy-template-loader`

## Usage

``` javascript
var template = require("index.tpl");
// => returns the template function compiled with template engine,like underscore (lodash).

// And then use it somewhere in your code
template(data) // Pass object with data
```

Config example using the ```ivy-template-loader``` config block.

``` javascript
module.exports = {
  rules: [
      {
        test: /\.tpl$/,
        exclude: /node_modules/,
        use: {
            loader: 'ivy-template-loader',
            options: {
                minimize: true,
                /* 可自定义 */
                settings: {
                    evaluate: /{{([\s\S]+?)}}/g,
                    interpolate: /<%=([\s\S]+?)%>/g,
                    escape: /<%-([\s\S]+?)%>/g
                }
            }
        }
      }
  ]
};
```

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