# webpack-assets-size-limit-plugin

> used to check whether the size of the asset output by webpack complier meets the expected value

Latest version **1.3.0** (published 2021-10-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install webpack-assets-size-limit-plugin
pnpm add webpack-assets-size-limit-plugin
yarn add webpack-assets-size-limit-plugin
bun add webpack-assets-size-limit-plugin
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.3.0 |
| Published | 2021-10-18 |
| First published | 2021-10-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | TravisChenn |
| Maintainers | travischen1996 |
| Keywords | assets size limit, webpack plugin |

## Links

- npm: https://www.npmjs.com/package/webpack-assets-size-limit-plugin
- Repository: https://github.com/TravisChenn1996/webpack-assets-size-limit-plugin
- Homepage: https://github.com/TravisChenn1996/webpack-assets-size-limit-plugin#readme
- Issues: https://github.com/TravisChenn1996/webpack-assets-size-limit-plugin/issues
- npm.io page: https://npm.io/package/webpack-assets-size-limit-plugin

## Dependencies (1)

- [chalk](https://npm.io/package/chalk.md) ^4.1.2

## 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

- 1.3.0 (latest) — 2021-10-18
- 1.2.0 — 2021-10-18
- 1.1.0 — 2021-10-17
- 0.0.4 — 2021-10-17
- 0.0.3 — 2021-10-17
- 0.0.2 — 2021-10-17
- 0.0.1 — 2021-10-17

## README

# webpack-assets-size-limit-plugin

## Quick Start

Install the plugin:

```
yarn -D webpack-assets-size-limit-plugin
```

Add it as as a plugin:

```
const webpackAssetsSizeLimitPlugin = require('webpack-assets-size-limit-plugin');

module.exports = {
    mode: 'production',
    plugins: [
        new webpackAssetsSizeLimitPlugin({
            maxAssetSize: 10,
            include: ['.js', '.css']
        })
    ]
};
```

Then run webpack:

```
yarn webpack
```

If the client bundle is larger than 10 kilobytes, then you'll get an error message like this:

```
 Error in WebpackAssetsSizeLimitPlugin
 - exceeded bundle count: 1
 - expected bundle size: 1 B
   1. main.js: 54 B
```

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