3.0.0 • Published 5 years ago
size-plugin v3.0.0
🙋 Using Rollup? Check out the rollup-plugin-size port.
Installation
Install size-plugin as a development dependency using npm:
npm i -D size-pluginUsage
Add an instance of the plugin to your webpack configuration:
// webpack.config.js
+ const SizePlugin = require('size-plugin');
module.exports = {
plugins: [
+ new SizePlugin()
]
}Options
Table of Contents
SizePlugin
new SizePlugin(options)
Parameters
optionsObjectoptions.patternstring? minimatch pattern of files to trackoptions.excludestring? minimatch pattern of files NOT to trackoptions.filenamestring? file name to save filesizes to diskoptions.publishboolean? option to publish filesizes to size-plugin-storeoptions.writeFileboolean? option to save filesizes to diskoptions.stripHashfunction? custom function to remove/normalize hashed filenames for comparison
Item
Properties
namestring Filename of the itemsizeBeforenumber Previous size, in kilobytessizenumber Current size, in kilobytessizeTextstring Formatted current sizedeltanumber Difference from previous size, in kilobytesdeltaTextstring Formatted size deltamsgstring Full item's default messagecolorstring The item's default CLI color
Data
Properties
License
This is not an official Google product.