Skip to content

mick-feller/size-plugin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

size-plugin npm

Prints the gzipped sizes of your webpack assets and the changes since the last build.

size-plugin

Installation

Install size-plugin as a development dependency using npm:

npm i -D size-plugin

Usage

Add an instance of the plugin to your webpack configuration:

// webpack.config.js
+ const SizePlugin = require('size-plugin');

module.exports = {
  plugins: [
+    new SizePlugin()
  ]
}

Options

History

This option will store a json file with the history of your build that you then can use to do bundle analysis over a period of time

// webpack.config.js
const SizePlugin = require('size-plugin');

module.exports = {
  plugins: [
    new SizePlugin({
      json: true,
      filename: 'report.json' // Relative to where webpack is ran
    })
  ]
}

License

Apache 2.0

This is not an official Google product.

About

Track compressed Webpack asset sizes over time.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%