webpack-bundle-diff-add-children
v0.1.0
Published
[npm](https://www.npmjs.com/package/webpack-bundle-diff-add-children), [github](https://github.com/Adjective-Object/webpack-bundle-diff-add-children)
Downloads
8
Readme
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`