How to use the webpack-bundle-analyzer/lib/analyzer.getViewerData function in webpack-bundle-analyzer

To help you get started, we’ve selected a few webpack-bundle-analyzer examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Automattic / wp-calypso / bin / icfy-analyze.js View on Github external
function analyzeBundle() {
	console.log( 'Analyze: reading stats.json file' );
	const stats = readStatsFromFile( 'stats.json' );
	console.log( 'Analyze: analyzing' );
	const chart = getViewerData( stats, './public/evergreen' );
	console.log( 'Analyze: writing chart.json file' );
	writeFileSync( 'chart.json', JSON.stringify( chart, null, 2 ) );
	console.log( 'Analyze: analyzing the style.css file' );
	analyzeStylesheet( './public/style.css', 'style.json' );
	console.log( 'Analyze: finished' );
}
github sghall / bundle-inspector-webpack-plugin / src / process.js View on Github external
processStats: stats => {
    const processed = getViewerData(stats);
    return JSON.stringify(processed);
  }
};

webpack-bundle-analyzer

Webpack plugin and CLI utility that represents bundle content as convenient interactive zoomable treemap

MIT
Latest version published 7 months ago

Package Health Score

87 / 100
Full package analysis