npm.io
4.22.3 • Published 7h ago

@bundle-stats/utils

Licence
MIT
Version
4.22.3
Deps
3
Size
526 kB
Vulns
0
Weekly
0
Stars
671

@bundle-stats/utils

Common utilities for bundle-stats packages.

How to generate a weback report

import { createJobs, createReport } from '@bundle-stats/utils';
import * as webpack from '@bundle-stats/utils/lib/webpack';

// Get webpack stats data
const WEBPACK_STATS_CURRENT = {/* ... */};
const WEBPACK_STATS_BASELINE = {/* ... */};

// Create jobs
const jobs = createJobs([
  { webpack: WEBPACK_STATS_CURRENT },
  { webpack: WEBPACK_STATS_BASELINE }
]);

// Create report
const report = createReport(jobs);

console.log(report.insights.webpack.assetsSizeTotal.data.text);
>> Bundle size increased to 9.77KB (+100%).

Packages

Packages

bundle-stats

npm npm

CLI to generate bundle stats report.

bundle-stats-webpack-plugin

npm npm

Webpack plugin to generate bundle stats report for webpack/rspack.

gatsby-plugin-bundle-stats

npm npm

Gatsby plugin for bundle-stats.

next-plugin-bundle-stats

npm npm

Next.js plugin for bundle-stats.

rollup-plugin-bundle-stats

npm npm

Rollup plugin to generate bundle stats report for vite/rolldown/rollup.

relative-ci.com
Automated bundle analysis, reviews and monitoring - Quickly identify and fix bundle regressions before shipping to production.

Get started

relative-ci/compare

Standalone web application to compare Webpack/Lighthouse/Browsertime stats.

Compare bundle stats

bundle-stats-action

Github Action that generates bundle-stats reports.