https://github.com/axtk/rollup-plugin-sizediff
Displays the rollup bundle size diff
https://github.com/axtk/rollup-plugin-sizediff
bundle-size diff rollup-plugin
Last synced: about 2 months ago
JSON representation
Displays the rollup bundle size diff
- Host: GitHub
- URL: https://github.com/axtk/rollup-plugin-sizediff
- Owner: axtk
- Created: 2020-12-15T03:31:15.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-12-15T06:12:25.000Z (over 5 years ago)
- Last Synced: 2026-02-25T00:12:26.700Z (4 months ago)
- Topics: bundle-size, diff, rollup-plugin
- Language: JavaScript
- Homepage:
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# rollup-plugin-sizediff
*Displays the [rollup](https://rollupjs.org) bundle size diff*
## Usage
```js
// rollup.config.js
import sizeDiff from 'rollup-plugin-sizediff';
export default {
input: './index.js',
output: {
file: `./build/index.js`,
},
plugins: [
// ... rollup plugins
sizeDiff()
],
};
```
Output:
```diff
./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
```js
sizeDiff({
output: string, // bundle stats file location
})
```
## Installation
```
npm i -D github:axtk/rollup-plugin-sizediff
```