# inline-manifest-webpack-plugin

> inline your Webpack manifest.js with a script tag to save http request

Latest version **4.0.2** (published 2018-09-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install inline-manifest-webpack-plugin
pnpm add inline-manifest-webpack-plugin
yarn add inline-manifest-webpack-plugin
bun add inline-manifest-webpack-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 | 4.0.2 |
| Published | 2018-09-09 |
| First published | 2016-05-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 7.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 158 |
| Author | szrenwei |
| Maintainers | szrenwei |
| Keywords | webpack, plugin, manifest, runtime, inline-manifest-webpack-plugin |

## Links

- npm: https://www.npmjs.com/package/inline-manifest-webpack-plugin
- Repository: https://github.com/szrenwei/inline-manifest-webpack-plugin
- Issues: https://github.com/szrenwei/inline-manifest-webpack-plugin/issues
- npm.io page: https://npm.io/package/inline-manifest-webpack-plugin

## Dependencies (1)

- [source-map-url](https://npm.io/package/source-map-url.md) 0.4.0

## Alternatives

- [raw-loader](https://npm.io/package/raw-loader.md) — 4.3M weekly downloads
- [plop](https://npm.io/package/plop.md) — 1.4M weekly downloads
- [webpack-deadcode-plugin](https://npm.io/package/webpack-deadcode-plugin.md) — 80.3K weekly downloads
- [@storybook/preact-vite](https://npm.io/package/@storybook/preact-vite.md) — 54.2K weekly downloads
- [vite-plugin-transform](https://npm.io/package/vite-plugin-transform.md) — 2.4K weekly downloads

## Recent versions

- 4.0.2 (latest) — 2018-09-09
- 4.0.1 — 2018-07-17
- 4.0.0 — 2018-05-07
- 3.0.1 — 2016-05-25
- 3.0.0 — 2016-05-25
- 2.1.0 — 2016-05-24
- 2.0.0 — 2016-05-21
- 1.1.0 — 2016-05-21
- 1.0.0 — 2016-05-19

## README

[![CircleCI](https://circleci.com/gh/szrenwei/inline-manifest-webpack-plugin/tree/master.svg?style=shield)](https://circleci.com/gh/szrenwei/inline-manifest-webpack-plugin/tree/master) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com) [![npm](https://img.shields.io/npm/dt/inline-manifest-webpack-plugin.svg)](https://www.npmjs.com/package/inline-manifest-webpack-plugin)  [![npm](https://img.shields.io/npm/v/inline-manifest-webpack-plugin.svg)](https://www.npmjs.com/package/inline-manifest-webpack-plugin) [![npm](https://img.shields.io/npm/l/inline-manifest-webpack-plugin.svg)](https://www.npmjs.com/package/inline-manifest-webpack-plugin)

Inline Manifest Webpack Plugin
===================

This is a [webpack](http://webpack.github.io/) plugin that inline your manifest.js with a script tag to save http request. Cause webpack's runtime always change between every build, it's better to split the runtime code out for long-term caching.


Installation
------------
Install the plugin with npm:
```shell
$ npm i inline-manifest-webpack-plugin -D
```

Basic Usage
-----------

This plugin need to work with [webpack v4](https://github.com/webpack/webpack) (for webpack v3 and below, pls use [version 3](https://github.com/szrenwei/inline-manifest-webpack-plugin/tree/v3.0.1)) and [HtmlWebpackPlugin v3](https://www.npmjs.com/package/html-webpack-plugin) :

__Step1__: split out the runtime code
```javascript
// the default name is "runtime"
optimization: {
    runtimeChunk: 'single'
 }

// or specify another name
optimization: {
    runtimeChunk: {
        name: 'another name'
    }
 }

```
__Step2__: add plugins:
```javascript
// this plugin need to put after HtmlWebpackPlugin
[
    new HtmlWebpackPlugin(),
    new InlineManifestWebpackPlugin()
]

or

[
    new HtmlWebpackPlugin(),
    // if you changed the runtimeChunk's name, you need to sync it here
    new InlineManifestWebpackPlugin('another name')
]

```
__Done!__ This will replace the external script with inline code.

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