webpack-bundle-diff-add-children
A utility to add children to the bundle graph produced by webpack-bundle-diff (npm, github)
Usage
yarn add webpack-bundle-diff-add-children
const getModuleGraphWithChildren = require('webpack-bundle-diff-add-children')
.getModuleGraphWithChildren
const deriveBundleData = require('webpack-bundle-diff').deriveBundleData
// Get your bundle stats somehow
const webpackStats = require('fs').readFileSync('./stats.json', 'utf-8')
// Derive webpack-bundle-diff data
const data = deriveBundleData(webpackStats)
// Add children to the graph
const graphWithChildren = getModuleGraphWithChildren(stats.bundleData.graph)
Development
yarn # install dependencies
yarn build # build. Can also use `rollup -c`
yarn watch # build with watch. Can also use `rollup -cw`