On this page
Tree shaking and bundle size
How AXIcons stays small in your bundle, with measured sizes.
How it works
All icons live in one ES module per package. Each export is a plain literal or a /*#__PURE__*/ call, and every package declares "sideEffects": false, so bundlers drop the icons you don't import.
Measured sizes
The project measured these with esbuild (--bundle --minify, React external):
| Import | Minified | Gzip |
|---|---|---|
IconCamera + IconHeartFilled from @axcore/xicons-react | 1.0 kB | 0.66 kB |
IconCamera + toSvg from @axcore/xicons | 0.75 kB | not measured |
What defeats it
import * as Iconswith a dynamic lookup.- The brand
Iconcomponent orgetIconSvg: each loads the brand registry. - CommonJS interop layers that wrap the package.
Something wrong or missing?Open an issue