A Webpack plugin to check file (js|css) size after build by webpack and gzip compress.
Using npm:
$ npm install compression-webpack-plugin file-size-check-plugin --save-dev
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
})
]
};