# html-webpack-inline-chunks-plugin

> a webpack plugin work with html-webpack-plugin，use it to insert script as inline to html file.

Latest version **0.1.3** (published 2017-04-26) · ISC license · 0 weekly downloads

## Install

```sh
npm install html-webpack-inline-chunks-plugin
pnpm add html-webpack-inline-chunks-plugin
yarn add html-webpack-inline-chunks-plugin
bun add html-webpack-inline-chunks-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.1.3 |
| Published | 2017-04-26 |
| First published | 2017-02-15 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Rookiewan |
| Maintainers | rookiewan |
| Keywords | webpack, html-webpack-plugin, html-webpack-inline-plugin |

## Links

- npm: https://www.npmjs.com/package/html-webpack-inline-chunks-plugin
- Repository: https://github.com/Rookiewan/htm-webpack-inline-chunks-plugin
- Homepage: https://github.com/Rookiewan/htm-webpack-inline-chunks-plugin#readme
- Issues: https://github.com/Rookiewan/htm-webpack-inline-chunks-plugin/issues
- npm.io page: https://npm.io/package/html-webpack-inline-chunks-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.1.3 (latest) — 2017-04-26
- 0.1.2 — 2017-03-01
- 0.1.1 — 2017-02-24
- 1.0.0 — 2017-02-15

## README

# html-webpackinline-chunks-plugin
a webpack plugin work with html-webpack-plugin，use it to insert script as inline to html file.
This is an extension plugin for the [webpack](http://webpack.github.io) plugin [html-webpack-plugin](https://github.com/ampedandwired/html-webpack-plugin).  It allows you to embed javascript and css source inline.

Installation
------------
You must be running webpack on node 0.12.x or higher

Install the plugin with npm:
```shell
$ npm install --save-dev html-webpack-inline-chunks-plugin
```

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

```javascript
var HtmlWebpackInlineChunksPlugin = require('html-webpack-inline-chunks-plugin');
```

Add the plugin to your webpack config as follows:

```javascript
plugins: [
  new HtmlWebpackPlugin(),
  new HtmlWebpackInlineChunksPlugin()
]  
```
The above configuration will actually do nothing due to the configuration defaults.

When you set `inlineChunks` to chunks array will be embedded inline in the resulting html document.
```javascript
entry: {
  loading: './xxx/loading'
},
plugins: [
  new HtmlWebpackPlugin({
		inlineChunks: ['loading']
	}),
  new HtmlWebpackInlineChunksPlugin()
]  
```
if you have many pages and want to set the same chunk, do like this
```javascript
entry: {
  layer: './xxx/layer'
  loading: './xxx/loading'
},
plugins: [
  new HtmlWebpackPlugin({
		inlineChunks: []
	}),
  new HtmlWebpackPlugin({
		inlineChunks: ['layer']
	}),
  new HtmlWebpackInlineChunksPlugin({
    chunks: ['loading']
  })
]  
```

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