# webpack-html-plugin-reload

> A plugin of html-webpack-plugin

Latest version **1.0.1** (published 2018-04-02) · ISC license · 0 weekly downloads

## Install

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

## 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.1 |
| Published | 2018-04-02 |
| First published | 2018-04-02 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 2.7 KB |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | wjj5728 |
| Maintainers | wjj5728 |
| Keywords | html-webpack-plugin, reload |

## Links

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

## Dependencies (1)

- [socket.io](https://npm.io/package/socket.io.md) ^1.4.8

## 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.1 (latest) — 2018-04-02
- 1.0.0 — 2018-04-02

## README

# HTML Webpack Plugin Reload

如果在webpack-dev-server开启hot模式的情况，修改html模板是无法自动刷新的，之后在一个[webpack教程](https://github.com/AriaFallah/WebpackTutorial/tree/master/part1/html-reload)中找到了一个方案，
后来在使用中发现当在入口文件中加入

```javascript

if (module.hot) {
    module.hot.accept()
}

```
html文件还是无法刷新
后来发现有webpack-html-plugin可以完成
全部代码都来自于两者的结合
[andrewcoelho](https://github.com/andrewcoelho/reload-html-webpack-plugin)
[zsy1993](https://github.com/zsy1993/reload-template-webpack-plugin)
## 用法

```javascript
// in webpack.config.js

var ReloadPlugin = require('webpack-html-plugin-reload');

//

plugins: [
    new ReloadPlugin()
]

//


```

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