# html-webpack-inline-icon-plugin

> Embed icons as data URLs in the output HTML file

Latest version **1.1.0** (published 2022-09-16) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities; high maintenance score.

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

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2022-09-16 |
| First published | 2022-09-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 5.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Tomáš Linhart |
| Maintainers | tlinhart |
| Keywords | webpack, plugin, html-webpack-plugin |

## Links

- npm: https://www.npmjs.com/package/html-webpack-inline-icon-plugin
- Repository: https://github.com/tlinhart/html-webpack-inline-icon-plugin
- Issues: https://github.com/tlinhart/html-webpack-inline-icon-plugin/issues
- npm.io page: https://npm.io/package/html-webpack-inline-icon-plugin

## Dependencies (2)

- [is-svg](https://npm.io/package/is-svg.md) ^4.3.2
- [image-type](https://npm.io/package/image-type.md) ^4.1.0

## 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.0 (latest) — 2022-09-16
- 1.0.0 — 2022-09-15

## README

# Inline Icon Extension for HTML Webpack Plugin

[![CI workflow status][badge]][actions]

[badge]: https://github.com/tlinhart/html-webpack-inline-icon-plugin/actions/workflows/ci.yml/badge.svg
[actions]: https://github.com/tlinhart/html-webpack-inline-icon-plugin/actions

Extension to [`HtmlWebpackPlugin`](https://github.com/jantimon/html-webpack-plugin)
which embeds icons as data URLs in the output HTML file. Inspired by
[`InlineChunkHtmlPlugin`](https://github.com/facebook/create-react-app/blob/main/packages/react-dev-utils/InlineChunkHtmlPlugin.js)
from [react-dev-utils](https://github.com/facebook/create-react-app/tree/main/packages/react-dev-utils)
package.

## Installation

```sh
npm install --save-dev html-webpack-inline-icon-plugin
```

## Usage

```js
const path = require("path");
const HtmlWebpackPlugin = require("html-webpack-plugin");
const InlineIconHtmlPlugin = require("html-webpack-inline-icon-plugin");

module.exports = {
  // ...
  plugins: [
    // Generate `index.html` with favicon injected.
    new HtmlWebpackPlugin({
      inject: true,
      template: path.resolve(__dirname, "public/index.html"),
      favicon: path.resolve(__dirname, "public/favicon.png"),
    }),
    // Inline icons with `favicon` in the name.
    new InlineIconHtmlPlugin(HtmlWebpackPlugin, [/favicon/]),
    // ...
  ],
  // ...
};
```

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