包详细信息

rollup-plugin-sizes

tivac33.8kMIT1.1.0

Show info about files/packages included with your rollup bundle

rollup, filesizes, bundler, rollup-plugin

自述文件

rollup-plugin-sizes NPM Version Build Status

Simple analysis on rollup bundling, helping you to spot libaries bloating up your bundles.

/src/index.js:
codemirror - 446.92 KB (35.94%)
remarkable - 193.72 KB (15.58%)
app - 95.87 KB (7.71%)
autolinker - 81.64 KB (6.57%)
lodash.filter - 62.77 KB (5.05%)
...

or with way more details!

/src/index.js:
codemirror - 446.92 KB (35.94%)
        lib\codemirror.js - 347.8 KB (77.82%)
        mode\javascript\javascript.js - 27.78 KB (6.22%)
        mode\markdown\markdown.js - 25.54 KB (5.72%)
        mode\meta.js - 14.44 KB (3.23%)
        mode\xml\xml.js - 12.52 KB (2.80%)
        addon\edit\closebrackets.js - 7.04 KB (1.58%)
        addon\edit\matchbrackets.js - 5.39 KB (1.21%)
        addon\comment\continuecomment.js - 3.59 KB (0.80%)
        addon\selection\active-line.js - 2.82 KB (0.63%)
remarkable - 193.72 KB (15.58%)
        lib\common\entities.js - 46.44 KB (23.97%)
        lib\rules.js - 10.2 KB (5.26%)
        lib\rules_block\list.js - 6.65 KB (3.43%)
        lib\ruler.js - 5.44 KB (2.81%)
        lib\rules_block\deflist.js - 5.22 KB (2.69%)
...

Install

$ npm i rollup-plugin-sizes -D

Usage

Add to your rollup build as the last plugin via JS API or Config file.

JS API

var rollup = require("rollup"),

    buble = require("rollup-plugin-buble"),
    sizes = require("rollup-plugin-sizes");

rollup.rollup({
    entry   : "src/main.js",
    plugins : [
        buble(),
        sizes()
    ]
}).then(function(bundle) {
    ...
});

Config file

import buble from 'rollup-plugin-buble';
import sizes from 'rollup-plugin-sizes';

export default {
    ...
    plugins : [
        buble(),
        sizes()
    ]
};

Options

details - Set to true to enable file-by-file breakdowns of space usage.

report - Customize reporting. See source code for the default reporter.

更新日志

1.0.5

1.1.0

Minor Changes

1.0.6

Patch Changes

Patch Changes

1.0.4 (2021-02-26)

Bug Fixes

  • don't crash when module doesn't map to an input (#76) (881eada)

1.0.3 (2020-07-22)

1.0.2 (2020-03-18)

Bug Fixes

1.0.1 (2019-12-07)

1.0.0 (2019-12-07)

Features

  • better multi-bundle support (78be22b)
  • update deprecated ongenerate hook to generateBundle (#15) (f2df7a8)

BREAKING CHANGES

  • rollup@1 is required to use the generateBundle hook

0.5.1 (2019-02-25)

0.5.0 (2019-02-25)

Bug Fixes

0.4.2 (2017-11-01)

0.4.1 (2017-11-01)

Bug Fixes

  • Replace 'entry' with 'input' (#5) (8ae4f50)

0.4.0 (2017-06-17)

0.3.0 (2017-06-17)

Bug Fixes

  • disable eslint for now (9a4f0e4)
  • reflect latest commonjs changes, more accurate totals (793565f), closes #2
  • remove object destructuring (03966c1)

Features

0.2.3 (2016-08-16)

0.2.2 (2016-08-16)

0.2.1 (2016-08-16)

0.2.0 (2016-08-16)

0.1.0 (2016-08-16)