# html-webpack-processing-plugin

> HTML pre-processing and post-processing for html-webpack-plugin

Latest version **1.0.2** (published 2022-08-02) · MIT license · 0 weekly downloads

## Install

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

## 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.0.2 |
| Published | 2022-08-02 |
| First published | 2016-11-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 9.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Haoliang Yu |
| Maintainers | haoliang |
| Keywords | webpack, html, post-processing, pre-processing, hook |

## Links

- npm: https://www.npmjs.com/package/html-webpack-processing-plugin
- Repository: https://github.com/haoliangyu/html-webpack-processing-plugin
- Homepage: https://github.com/haoliangyu/html-webpack-processing-plugin#readme
- Issues: https://github.com/haoliangyu/html-webpack-processing-plugin/issues
- npm.io page: https://npm.io/package/html-webpack-processing-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

- 1.0.2 (latest) — 2022-08-02
- 1.0.1 — 2020-05-15
- 1.0.0 — 2020-05-14
- 0.1.3 — 2019-10-29
- 0.1.2 — 2016-11-02
- 0.1.1 — 2016-11-01
- 0.1.0 — 2016-11-01

## README

# html-webpack-processing-plugin

[![npm](https://img.shields.io/npm/v/html-webpack-processing-plugin)](https://www.npmjs.com/package/html-webpack-processing-plugin) [![NPM](https://img.shields.io/npm/l/html-webpack-processing-plugin)](https://github.com/haoliangyu/html-webpack-processing-plugin/blob/master/LICENSE) [![Build Status](https://www.travis-ci.org/haoliangyu/html-webpack-processing-plugin.svg?branch=master)](https://www.travis-ci.org/haoliangyu/html-webpack-processing-plugin)

HTML pre-processing and post-processing for [html-webpack-plugin](https://github.com/ampedandwired/html-webpack-plugin). It supports webpack v4.

## Installation

```bash
npm install html-webpack-processing-plugin
```

## Usage

- add pre-processor

```javascript
const HtmlWebpackPlugin = require("html-webpack-plugin");
const HtmlWebpackProcessingPlugin = require("html-webpack-processing-plugin");

const webpackConfig = {
  entry: "index.js",
  output: {
    path: "dist",
    filename: "index_bundle.js",
  },
  plugins: [
    new HtmlWebpackPlugin({
      preProcessing: (originalHTML) => {
        let newHTML = originalHTML + "<div></div>";
        return newHTML;
      },
    }),
    new HtmlWebpackProcessingPlugin(),
  ],
};
```

- add post-processor

```javascript
const HtmlWebpackPlugin = require('html-webpack-plugin');
const HtmlWebpackProcessingPlugin = require('html-webpack-processing-plugin';)

const webpackConfig = {
  entry: 'index.js',
  output: {
    path: 'dist',
    filename: 'index_bundle.js'
  },
  plugins: [
    new HtmlWebpackPlugin({
      postProcessing: originalHTML => {
        let newHTML = originalHTML + '<div></div>';
        return newHTML;
      }
    }),
    new HtmlWebpackProcessingPlugin()
  ]
};
```

## License

This project is licensed under MIT.

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