# webpack-mild-compile

> a workaround to prevent webpack endlessly compile

Latest version **3.4.0** (published 2021-07-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install webpack-mild-compile
pnpm add webpack-mild-compile
yarn add webpack-mild-compile
bun add webpack-mild-compile
```

## 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 | 3.4.0 |
| Published | 2021-07-05 |
| First published | 2017-08-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51 |
| Author | aaron.xiao |
| Maintainers | aaron.xiao |
| Keywords | webpack, endless, compile |

## Links

- npm: https://www.npmjs.com/package/webpack-mild-compile
- Repository: https://github.com/yessky/webpack-mild-compile
- Homepage: https://github.com/yessky/webpack-mild-compile#readme
- Issues: https://github.com/yessky/webpack-mild-compile/issues
- npm.io page: https://npm.io/package/webpack-mild-compile

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 3.4.0 (latest) — 2021-07-05
- 3.3.1 — 2018-11-21
- 3.3.0 — 2018-11-19
- 3.2.0 — 2018-04-04
- 3.1.0 — 2018-03-20
- 3.0.0 — 2018-03-07
- 2.0.0 — 2017-11-24
- 1.0.0 — 2017-08-01

## README

# webpack-mild-compile

[![NPM version](https://img.shields.io/npm/v/webpack-mild-compile.svg)](https://npmjs.com/package/webpack-mild-compile) [![NPM downloads](https://img.shields.io/npm/dm/webpack-mild-compile.svg)](https://npmjs.com/package/webpack-mild-compile)

webpack v2/3/4/5 supported.

a workaround to prevent webpack endlessly compile, see more at [#25](https://github.com/webpack/watchpack/issues/25)

this is very useful, if you are using some webpack plugins like webpack-iconfont, webpack-spritesmith.

if this project resolves your headache, plz star it.

如果在webpack的watch动作前创建文件将在10秒内引发多次重复编译，本项目提供了一种可行的解决方案用于修复该问题。

如果你使用了像webpack-iconfont/webpack-spritesmith等需要动态创建文件的插件，那么本项目将会解决上述提到的这个问题。

如果这个项目解决了让你头痛的问题，那么点个赞吧

## Install（安装）

```
npm i --save-dev webpack-mild-compile
```

## Webpack Plugin (作为webpack插件使用)

```JavaScript
const WebpackMildCompile = require('webpack-mild-compile').Plugin;

...
plugins: [
  new WebpackMildCompile()
]
```


## Node API (作为api使用)

```JavaScript
const compiler = webpack(webpackConfig);
require('webpack-mild-compile')(compiler);

const app = new Koa();
const devMiddleware = koaWebpack({
  compiler,
  dev: {
    noInfo: true,
    watchOptions: {
      aggregateTimeout: 500,
      ignored: /node_modules/,
      poll: false
    },
    publicPath: webpackConfig.output.publicPath,
    stats: {
      colors: true
    }
  },
  hot: {
    log: console.log,
    heartbeat: 2000
  }
});
```

## Credit
[aaron.xiao](https://veryos.com)

## License
MIT

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