# html-webpack-slim-plugin

> Simplifies creation of Slim files to serve your webpack bundles(Extension of html-webpack-plugin)

Latest version **0.3.0** (published 2018-03-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install html-webpack-slim-plugin
pnpm add html-webpack-slim-plugin
yarn add html-webpack-slim-plugin
bun add html-webpack-slim-plugin
```

## 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.3.0 |
| Published | 2018-03-15 |
| First published | 2017-05-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 15.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Yoshiaki Itakura |
| Maintainers | negibouze |
| Keywords | webpack, plugin, slim, html-webpack-plugin |

## Links

- npm: https://www.npmjs.com/package/html-webpack-slim-plugin
- Repository: https://github.com/negibouze/html-webpack-slim-plugin
- Homepage: https://github.com/negibouze/html-webpack-slim-plugin#readme
- Issues: https://github.com/negibouze/html-webpack-slim-plugin/issues
- npm.io page: https://npm.io/package/html-webpack-slim-plugin

## 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.3.0 (latest) — 2018-03-15
- 0.2.0 — 2017-05-30
- 0.1.0 — 2017-05-19

## README

Slim extension for the HTML Webpack Plugin
========================================

Installation
------------
Install the plugin with npm:

```shell
$ npm install --save-dev html-webpack-slim-plugin
```

Install the plugin with yarn:

```shell
$ yarn add --dev html-webpack-slim-plugin
```

Usage
-----
Require the plugin in your webpack config:

```javascript
var HtmlWebpackSlimPlugin = require('html-webpack-slim-plugin');
```

ES2015

```es2015
import HtmlWebpackSlimPlugin from 'html-webpack-slim-plugin';
```

Add the plugin to your webpack config as follows:

```javascript
// Please specify filetype 'slim' or filename '*.slim'.
plugins: [
  new HtmlWebpackPlugin({
    filetype: 'slim'
  }),
  new HtmlWebpackPlugin({
    filename: 'output.slim'
  }),
  new HtmlWebpackSlimPlugin()
]  
```

Even if you generate multiple files make sure that you add the HtmlWebpackSlimPlugin **only once**:

```javascript
plugins: [
  new HtmlWebpackPlugin({
    template: 'src/views/test.slim',
    filetype: 'slim'
  }),
  new HtmlWebpackPlugin({
    template: 'src/views/test.slim',
    filename: 'test.slim'
  }),
  new HtmlWebpackSlimPlugin()
]  
```

Output Example
--------------

```slim
doctype html
html
  head
    meta charset="utf-8"
    link href="bundle.css" rel="stylesheet"
  body
    script type="text/javascript" src="bundle.js"
```

If you are interested, look at examples.

License
-------

This project is licensed under [MIT](https://github.com/negibouze/html-webpack-slim-plugin/blob/master/LICENSE).

---
_Source: https://npm.io/package/html-webpack-slim-plugin · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
