@bundle-stats/utils

BundleStats utils

Usage no npm install needed!

<script type="module">
  import bundleStatsUtils from 'https://cdn.skypack.dev/@bundle-stats/utils';
</script>

README

@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

Related projects

:cyclone: relative-ci.com

Specialized insights for web bundles:

  • Analyze and monitor webpack stats(bundle size, assets, modules, packages)
  • GitHub Check, GitHub Pull Request, and Slack integrations
  • Support for all major CI services (CircleCI, GitHub Actions, Gitlab CI, Jenkins, Travis CI)
  • Free for OpenSource, developers and small teams

Try for free

:first_quarter_moon: relative-ci/compare

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

Compare bundle stats

:zap: bundle-stats-action

Github Action that generates bundle-stats reports for webpack.