# file-size-check-plugin

> Webpack plugin that check the file size after build.

Latest version **0.1.0** (published 2020-01-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install file-size-check-plugin
pnpm add file-size-check-plugin
yarn add file-size-check-plugin
bun add file-size-check-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.0 |
| Published | 2020-01-16 |
| First published | 2020-01-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | henryxie2093@gmail.com |
| Maintainers | henryxie2093 |
| Keywords | webpack, plugin, file, size |

## Links

- npm: https://www.npmjs.com/package/file-size-check-plugin
- Repository: https://github.com/amazg/file-size-check-plugin
- Homepage: https://github.com/amazg/file-size-check-plugin#readme
- Issues: https://github.com/amazg/file-size-check-plugin/issues
- npm.io page: https://npm.io/package/file-size-check-plugin

## Alternatives

- [unionfs](https://npm.io/package/unionfs.md) — 2.2M weekly downloads
- [path-starts-with](https://npm.io/package/path-starts-with.md) — 35.9K weekly downloads
- [redzip](https://npm.io/package/redzip.md) — 1.2K weekly downloads
- [vscode-anymatch](https://npm.io/package/vscode-anymatch.md) — 848 weekly downloads
- [@ledgerhq/coin-filecoin](https://npm.io/package/@ledgerhq/coin-filecoin.md) — 793 weekly downloads

## Recent versions

- 0.1.0 (latest) — 2020-01-16
- 0.0.9 — 2020-01-16
- 0.0.8 — 2020-01-15
- 0.0.7 — 2020-01-15
- 0.0.6 — 2020-01-15
- 0.0.5 — 2020-01-15
- 0.0.4 — 2020-01-15
- 0.0.3 — 2020-01-15
- 0.0.2 — 2020-01-14
- 0.0.1 — 2020-01-14

## README

# file-size-check-plugin
![npm](https://img.shields.io/npm/dw/file-size-check-plugin?label=npm%20install)

A Webpack plugin to check file (js|css) size after build by webpack and gzip compress.

## Installation:

Using npm:
```shell
$ npm install compression-webpack-plugin file-size-check-plugin --save-dev 
```

## Example:

⚠️ Need to use [compression-webpack-plugin](https://github.com/webpack-contrib/compression-webpack-plugin), Because file-size-check-plugin check the file end with .gz 

⚠️ If you don't set the 'fileSizeLimit' params, it will be set at 300 * 1024 by default.

``` javascript
const CompressionWebpackPlugin = require('compression-webpack-plugin');
const FileSizeCheck = require('file-size-check-plugin');

webpackConfig = {
  plugins: [
    new CompressionWebpackPlugin({
      test: /\.(js|css)(\?.*)?$/i
    }),
    new FileSizeCheck({ 
      fileSizeLimit: 300 * 1024
    })
  ]
};
```

## License

MIT (http://www.opensource.org/licenses/mit-license.php)

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