Gathering detailed insights and metrics for webpack-bundle-diff-add-reasons
Gathering detailed insights and metrics for webpack-bundle-diff-add-reasons
Gathering detailed insights and metrics for webpack-bundle-diff-add-reasons
Gathering detailed insights and metrics for webpack-bundle-diff-add-reasons
Add import reasons / reason children to webpack bundle diff
npm install webpack-bundle-diff-add-reasons
Typescript
Module System
Node Version
NPM Version
TypeScript (97.76%)
JavaScript (2.24%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
28 Commits
1 Forks
2 Watchers
5 Branches
2 Contributors
Updated on Nov 02, 2021
Latest Version
0.0.5
Package Id
webpack-bundle-diff-add-reasons@0.0.5
Unpacked Size
14.64 kB
Size
3.37 kB
File Count
7
NPM Version
6.14.15
Node Version
14.17.6
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
A utility to add reasons to the bundle graph produced by webpack-bundle-diff (npm, github)
When webpack-bundle-diff
adds children to the depgraph, it moves hoisted modules into their hoisted parent.
This is fine for tracking the graph of modules in the bundle, but it makes tracking exaclty how a given file ends up inside the graph a little difficult.
This module adds reasons back to the bundleGraph output. This may be be preferrable to analyzing stats.json
directly when it is too large to be processed by most tools that depend on stats.json. (e.g. it is multiple gigabytes)
yarn add webpack-bundle-diff-add-reasons
1const getModuleGraphWithChildren = require('webpack-bundle-diff-add-reasons') 2 .getModuleGraphWithChildren; 3const deriveBundleData = require('webpack-bundle-diff').deriveBundleData; 4 5// Get your bundle stats somehow 6const webpackStats = require('fs').readFileSync('./stats.json', 'utf-8'); 7 8// Derive webpack-bundle-diff data 9const data = deriveBundleData(webpackStats); 10 11// Add reasons to the graph 12const graphWithReasons = getModuleGraphWithReasons( 13 data.bundleData.graph, 14 webpackStats, 15);
1yarn # install dependencies 2yarn build # build. Can also use `rollup -c` 3yarn watch # build with watch. Can also use `rollup -cw` 4yarn jest # run tests 5npm publish
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
Found 3/21 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
license file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
18 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-14
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 More