Skip to content
Comvi

Bundle size

View .md

What each piece of Comvi i18n weighs, and which import adds it.

Figures are min+gz, produced by pnpm size and measured through each package’s published exports map rather than a dist/ path, so what is measured is what an installed app resolves. A framework’s own runtime is left out, so a framework row is the Comvi code only.

CI re-measures every row against its recorded baseline with 5% of headroom and fails when a row exceeds that budget, so a regression inside the margin passes.

app shape measured as min+gz
@comvi/core alone, nothing composed core-base 5607 B
@comvi/core + ICU core-base-icu 6843 B
@comvi/core + devtools() core-base-devtools 6870 B
every core capability composed core-full-composite 10575 B
@comvi/react, bare instance + bindings fw-react-default 7606 B
@comvi/react, every capability composed fw-react-full-composite 13526 B
@comvi/react + ICU + the CDN loader platform-path-react 12157 B
core + ICU + the CDN loader plugin-fetch-loader 10228 B

Every figure names its fixture, and each fixture is a gated row in scripts/size-budgets.json in the comvi-js repository, measured on 2026-10-20. Rows one and two give the price of ICU, 1236 B, which is why it is the compiler constructor option rather than a default. Rows one and three give the price of browser-extension discovery together with the editor loader devtools() installs, 1263 B. Rows one and five give the price of the React bindings over the core floor, 1999 B. Rows five and six bracket a React app: the bindings alone against everything composed.

core-full-composite recomposes /tags, /icu, /loader, /plugins and /devtools.

The root entry of @comvi/plugin-fetch-loader is the CDN request path on its own. fetchLoader from @comvi/plugin-fetch-loader/api chooses between the CDN and the API at runtime, so it carries both request paths whether or not you reach them.

graph measured as min+gz
bare instance, ICU, and the /api entry plugin-fetch-loader-api 12161 B
bare instance, ICU, and the root entry plugin-fetch-loader 10228 B

An app that only reads a public bundle swaps fetchLoader for cdnLoader and drops 1933 B with the API path. Keep fetchLoader wherever the i18n instance has an apiKey. See CDN mode vs API mode.

The import-map adapter behind .use(loader(map)) is in your graph only when you hand over a map: attachLoader does not name it, so an instance that registers a plain loader function never carries it.

Every capability is an import you add, so the floor is the bare instance and each capability is a line in your own composition.

  • Nothing arrives switched off. An absent capability’s module never entered the bundle, which is why a missing one is a TypeScript error rather than a runtime no-op.
  • No eval and no new Function in any package, at runtime or at build time, so everything runs under a strict CSP without unsafe-eval.
  • @comvi/core has zero runtime dependencies.
  • The unpkg / jsdelivr global build is the one exception and still carries everything: a <script src> consumer has no import graph to extend. It composes discovery and the editor loader on its own, which an ESM app gets only through .use(devtools()), and exposeGlobal: false keeps both off the page.
  • .use(installer): the i18n instance, and what each installer adds to it.
  • Fetch loader: why the /api entry carries both request paths, and when to use which.
  • Pluralize with ICU: what the 1236 B buys: plural, select and selectordinal per framework.