A rollup plugin to show file size of the bundle in the cli
Installations
npm install rollup-plugin-filesize
Developer Guide
Typescript
No
Module System
CommonJS
Min. Node Version
>=16.0.0
Node Version
16.15.1
NPM Version
8.11.0
Score
63.2
Supply Chain
92.7
Quality
70.7
Maintenance
100
Vulnerability
96.1
License
Releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Developer
ritz078
Download Statistics
Total Downloads
20,237,907
Last Day
6,791
Last Week
29,056
Last Month
137,032
Last Year
2,184,687
GitHub Statistics
128 Stars
133 Commits
24 Forks
4 Watching
5 Branches
19 Contributors
Package Meta Information
Latest Version
10.0.0
Package Id
rollup-plugin-filesize@10.0.0
Unpacked Size
35.64 kB
Size
9.32 kB
File Count
9
NPM Version
8.11.0
Node Version
16.15.1
Publised On
27 Feb 2023
Total Downloads
Cumulative downloads
Total Downloads
20,237,907
Last day
-7.7%
6,791
Compared to previous day
Last week
-17.3%
29,056
Compared to previous week
Last month
3%
137,032
Compared to previous month
Last year
-25.6%
2,184,687
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
rollup-plugin-filesize
A rollup plugin to show filesize in the cli
Installation
npm install rollup-plugin-filesize
Usage
1import { rollup } from 'rollup'; 2import filesize from 'rollup-plugin-filesize'; 3 4rollup({ 5 entry: 'main.js', 6 plugins: [ 7 filesize() 8 ] 9}).then(...)
options
showMinifiedSize
type: boolean
default: true
Whether to show minified size or not
showGzippedSize
type: boolean
default: true
Whether to show Gzipped size or not
showBrotliSize
type: boolean
default: false
Whether to show Brotli size or not
showBeforeSizes
Note: this feature is experimental and may be changed in a future release.
type: "release"
, "build"
, or "none"
default: "none"
Indicates how, if any, comparisons will be shown between the
output.file
file size as it was and as it is now being written.
If set to "release"
, will compare the file size at present to that of
the last npm release.
If set to "build"
, the size of the file that is now being built will
be compared to the immediately previous build. This means that if you run
Rollup multiple times with this option, the info on the previous package
size will be lost (since Rollup will have overwritten your copy), so with
this option, you will need to consult your terminal history to see what the
file size was prior to your changes. This option may be useful if you wish
to compare size changes incrementally as you are developing rather than
comparing to your last release.
format
type : object
default : {}
See the options here
reporter
(Note that this replaces the deprecated optional render
function option.)
type : A reporter string (currently "boxen" only), a function, or an array thereof.
Defaults to "boxen".
After rendering occurs, you may wish to pass on the collected file data, e.g., to build a badge for filesizes (as does filesize-badger).
You can use reporter
to do so:
1filesize({ 2 reporter: [ 3 function (options, bundle, { 4 minSize, gzipSize, brotliSize, bundleSize, 5 fileName, 6 // "showBeforeSizes: release" 7 lastVersion, 8 // "showBeforeSizes: "release" or "showBeforeSizes": "build" 9 bundleSizeBefore, brotliSizeBefore, minSizeBefore, gzipSizeBefore 10 }) { 11 // If a promise is returned, it will be awaited before rendering. 12 return promise; 13 }, 14 ], 15});
theme
type: string
default : 'dark'
options : 'dark'/'light'
choose based on your terminal theme.
License
MIT
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
Found 13/26 approved changesets -- score normalized to 5
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/nodejs.yml:1
- Info: no jobLevel write permissions found
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/ritz078/rollup-plugin-filesize/nodejs.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/ritz078/rollup-plugin-filesize/nodejs.yml/master?enable=pin
- Warn: npmCommand not pinned by hash: .github/workflows/nodejs.yml:28
- Info: 0 out of 2 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 1 npmCommand dependencies pinned
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
license file not detected
Details
- Warn: project does not have a license file
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 18 are checked with a SAST tool
Reason
11 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-pfrx-2q88-qq97
- Warn: Project is vulnerable to: GHSA-78xj-cgh5-2h22
- Warn: Project is vulnerable to: GHSA-2p57-rm9w-gvfp
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36
- Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7
Score
2.9
/10
Last Scanned on 2025-01-27
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn MoreOther packages similar to rollup-plugin-filesize
rollup-plugin-summary
A rollup plugin that summarizes the build
rollup-plugin-filesize-gzbr
A Rollup plugin for calculating and displaying file sizes of generated bundles during the build process
rollup-plugin-filesize-check
ensure rollup builds are the expected size
cb-rollup-plugin-filesize
A rollup plugin to show filesize in the cli