Skip to content

Latest commit

 

History

History
45 lines (34 loc) · 805 Bytes

README.md

File metadata and controls

45 lines (34 loc) · 805 Bytes

rollup-plugin-sizediff

Displays the rollup bundle size diff

Usage

// rollup.config.js
import sizeDiff from 'rollup-plugin-sizediff';

export default {
    input: './index.js',
    output: {
        file: `./build/index.js`,
    },
    plugins: [
        // ... rollup plugins
        sizeDiff()
    ],
};

Output:

./index.js → ./build/index.js...   |
12.345 kB (+1.543 kB)              ] ← plugin output
created ./build/index.js in 497ms  |

The diff part in the parentheses will become available from the second run on, when the plugin picks its own record of the previous bundle size.

Options

sizeDiff({
    output: string, // bundle stats file location
})

Installation

npm i -D github:axtk/rollup-plugin-sizediff