# webpack-append-plugin

> webpack loader

Latest version **1.1.3** (published 2021-01-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install webpack-append-plugin
pnpm add webpack-append-plugin
yarn add webpack-append-plugin
bun add webpack-append-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.1.3 |
| Published | 2021-01-22 |
| First published | 2021-01-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | heloking |
| Maintainers | wangtengyun |
| Keywords | assets, js, append, webpack, webpack-plugin |

## Links

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

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 1.1.3 (latest) — 2021-01-22
- 1.1.2 — 2021-01-21
- 1.1.1 — 2021-01-19
- 1.1.0 — 2021-01-19
- 1.0.0 — 2021-01-19

## README

之前在 https://www.npmjs.com/package/assets-append-webpack-plugin 里的插件，也是同样功能，已经过期多年，不能再被使用了。
# 一、功能
在webpack 构建产物的 js 文件中，添加头部和尾部。并且适配 webpack5。


# 二、用法示例
## 1 webpack 配置
配置对象webpack.config.js ：
```
const WebpackAppendPlugin = require('webpack-append-plugin');

module.exports = {
    entry: 'index.js',
    output: {
        path: './build',
    },
    plugins: [
        new AssetsAppendWebpackPlugin({
            header: `/******* header ********/`,
            footer: `/******* footer ********/`
        })
    ]
}
```


## 2 效果
### test.js 前：
```
// webpack 构建内容
```

### test.js 后
```
/******* header ********/
// webpack 构建内容
/******* footer ********/
```

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