0.1.0 • Published 4 years ago

file-size-check-plugin v0.1.0

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

file-size-check-plugin

npm

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

Installation:

Using npm:

$ npm install compression-webpack-plugin file-size-check-plugin --save-dev 

Example:

⚠️ Need to use 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.

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)

0.1.0

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.3

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago