
Research
TeamPCP-Linked Supply Chain Attack Hits SAP CAP and Cloud MTA npm Packages
Compromised SAP CAP npm packages download and execute unverified binaries, creating urgent supply chain risk for affected developers and CI/CD environments.
cb-rollup-plugin-analyzer
Advanced tools
Mad metrics for your rollup bundles, know all the things
See what's bloating your bundle, how treeshaking has treated you, and other great stuff. Perfect for console printing an analysis of your bundle or integrating in your CI workflows.
Adding as a plugin to your rollup config or build script will allow you to print a well formatted analysis to the console upon bundling or get a full analysis object for CI purposes.
If using Rollup's CLI to bundle with no additional config, pass
-c node:rollup-config-analyzer to print a well formatted analysis to your console.
$ npm install --save-dev rollup-plugin-analyzer
import analyze from 'rollup-plugin-analyzer'
const analyze = require('rollup-plugin-analyzer')
export default {
entry: 'module.js',
dest: 'index.js',
format: 'cjs',
plugins: [analyze()]
}
rollup({
entry: 'main.js',
plugins: [analyze()]
}).then(...)
const limitBytes = 1e6
const onAnalysis = ({ bundleSize }) => {
if (bundleSize < limitBytes) return
console.log(`Bundle size exceeds ${limitBytes} bytes: ${bundleSize} bytes`)
return process.exit(1)
}
rollup({
entry: 'main.js',
plugins: [analyze({ onAnalysis, skipFormatted: true })]
}).then(...)
logged to console on rollup completion
-----------------------------
Rollup File Analysis
-----------------------------
bundle size: 2.809 KB
original size: 11.436 KB
code reduction: 75.44 %
module count: 5
ββββββββββββββββββββββββββββββββββββββββββββββββββ
file: /virtual-insanity.js
bundle space: 90.64 %
rendered size: 2.546 KB
original size: 2.57 KB
code reduction: 0.93 %
dependents: 1
- /jamiroquai.js
ββββββββββββββββββββββββββββββββββββββββββββββββββ
file: /bundle-a.js
bundle space: 4.27 %
rendered size: 120 Bytes
original size: 309 Bytes
code reduction: 61.17 %
dependents: 0
ββββββββββββββββββββββββββββββββββββββββββββββββββ
file: /jamiroquai.js
bundle space: 2.95 %
rendered size: 83 Bytes
original size: 169 Bytes
code reduction: 50.89 %
dependents: 1
- /the-alphabet-but-incomplete.js
...
summaryOnly enabled)-----------------------------
Rollup File Analysis
-----------------------------
bundle size: 2.809 KB
original size: 11.436 KB
code reduction: 75.44 %
module count: 5
/virtual-insanity.js
ββββββββββββββββββββββββββββββββββββββββββββββββββ 90.64 % (2.546 KB)
/bundle-a.js
ββββββββββββββββββββββββββββββββββββββββββββββββββ 4.27 % (120 Bytes)
/jamiroquai.js
ββββββββββββββββββββββββββββββββββββββββββββββββββ 2.95 % (83 Bytes)
/the-alphabet-but-incomplete.js
ββββββββββββββββββββββββββββββββββββββββββββββββββ 1.17 % (33 Bytes)
/the-declaration-of-independence.js
ββββββββββββββββββββββββββββββββββββββββββββββββββ 0.96 % (27 Bytes)
falsenullnullmodule object specified below, should return booleanprocess.cwd()falsefalsefalsefalsenullnull(id) => id.replace(/^\0(?:commonjs-proxy:)?/, '')nullmodule analysis objects
Rollup allows you to output to multiple files. If you are outputting to multiple files you will get a distinct analysis for each output file. Each analysis will contain data on the files imported by the respective target.
MIT Β© Andrew Carpenter
FAQs
Mad metrics for your rollup bundles, know all the things
The npm package cb-rollup-plugin-analyzer receives a total of 1 weekly downloads. As such, cb-rollup-plugin-analyzer popularity was classified as not popular.
We found that cb-rollup-plugin-analyzer demonstrated a not healthy version release cadence and project activity because the last version was released a year ago.Β It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
Compromised SAP CAP npm packages download and execute unverified binaries, creating urgent supply chain risk for affected developers and CI/CD environments.

Company News
Socket has acquired Secure Annex to expand extension security across browsers, IDEs, and AI tools.

Research
/Security News
Socket is tracking cloned Open VSX extensions tied to GlassWorm, with several updated from benign-looking sleepers into malware delivery vehicles.