0.1.6 • Published 7 years ago

webpack-bundle-size-check-plugin v0.1.6

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

WebpackBundleSizeCheckPlugin

Maintainability

Warning: Alpha code, please don't use in production just yet.

Desciption

A simple webpack plugin to keep your build size in check.

Getting Started

Installation

npm i webpack-bundle-size-check-plugin

Configuring

  1. Import in your webpack.config.js file.
  2. Add to your plugins array.
<!-- import on the top of the file -->
const WebpackBundleSizeCheckPlugin = require('webpack-bundle-size-check-plugin');

plugins: [
  new WebpackBundleSizeCheckPlugin([
    {
      chunkName: 'app.bundle.js',  // exact name of output file
      maxSize: '100',              // in KB
      mode: 'strict'               // "non-strict" by default
    }
  ])
]

and that's it.

If you select "strict" mode then the build will fail if the size exceeds the maxSize specified. If you select "non-strict" (default) mode then you will get a warning if the size exceeds the specified limit.

Now if you build size exceeds the allowed size, your build will fail with proper error message like Build Size for app.bundle.js exceeded the permitted size 100KB

0.1.6

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.5

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago