# @iconsauce/core

> Includes only the SVG icons matched in your code and generates a CSS icon font set.

Latest version **2.0.4** (published 2026-11-10) · ISC license · 0 weekly downloads

## Install

```sh
npm install @iconsauce/core
pnpm add @iconsauce/core
yarn add @iconsauce/core
bun add @iconsauce/core
```

Provides the command `iconsauce`.

## Health

**Score 75/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 2.0.4 |
| Published | 2026-11-10 |
| First published | 2022-01-26 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=20.19 |
| Dependencies | 12 |
| Unpacked size | 48.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 5 |
| Author | Vittorio Vittori |
| Maintainers | vitto, nicola.tamburini.maggioli |
| Keywords | build, icon, svg, incremental, jit |

## Links

- npm: https://www.npmjs.com/package/@iconsauce/core
- Repository: https://github.com/iconsauce/core
- Homepage: https://github.com/iconsauce/core#readme
- Issues: https://github.com/iconsauce/core/issues
- npm.io page: https://npm.io/package/@iconsauce/core

## Dependencies (12)

- [arg](https://npm.io/package/arg.md) 5.0.2
- [chalk](https://npm.io/package/chalk.md) 4.1.2
- [fs-extra](https://npm.io/package/fs-extra.md) 11.4.1
- [fast-glob](https://npm.io/package/fast-glob.md) 3.3.3
- [lilconfig](https://npm.io/package/lilconfig.md) 3.1.5
- [handlebars](https://npm.io/package/handlebars.md) 4.7.10
- [fonteditor-core](https://npm.io/package/fonteditor-core.md) 2.6.3
- [svgicons2svgfont](https://npm.io/package/svgicons2svgfont.md) 16.0.0
- [@iconsauce/plugin](https://npm.io/package/@iconsauce/plugin.md) ^0.1.0
- [@iconsauce/mdi-svg](https://npm.io/package/@iconsauce/mdi-svg.md) ^1.0.8
- [@iconsauce/mgg-icons](https://npm.io/package/@iconsauce/mgg-icons.md) ^1.2.0
- [@iconsauce/material-icons](https://npm.io/package/@iconsauce/material-icons.md) ^1.0.3

## Alternatives

- [@fortawesome/react-fontawesome](https://npm.io/package/@fortawesome/react-fontawesome.md) — 2.2M weekly downloads
- [roboto-fontface](https://npm.io/package/roboto-fontface.md) — 196.0K weekly downloads
- [@react-native-vector-icons/common](https://npm.io/package/@react-native-vector-icons/common.md) — 150.4K weekly downloads
- [stockfish](https://npm.io/package/stockfish.md) — 27.0K weekly downloads
- [@procore/core-icons](https://npm.io/package/@procore/core-icons.md) — 4.6K weekly downloads

## Recent versions

- 2.0.4 (latest) — 2026-11-10
- 2.0.3 — 2026-10-16
- 2.0.2 — 2026-10-12
- 2.0.1 — 2026-10-01
- 2.0.0 — 2026-09-02
- 1.5.0 — 2026-05-28
- 1.4.0 — 2026-04-23
- 1.3.4 — 2026-04-13
- 1.3.3 — 2026-02-04
- 1.3.2 — 2025-12-10
- 1.3.1 — 2025-05-06
- 1.3.0 — 2025-03-19
- 1.2.5 — 2024-02-06
- 1.2.4 — 2024-02-02
- 1.2.2 — 2022-08-30
- … 41 more at https://npm.io/package/@iconsauce/core/versions

## README

# @iconsauce/core

Includes only the SVG icons matched in your code and generates a CSS icon font set.

### Examples

In this example you have all the **almost 7.000** [Google Material Design Icons](https://fonts.google.com/icons) collected by [material-design-icons-updated](https://github.com/stramel/material-design-icons-updated), but you'll be able to include only the icons you effectively use inside your code:

```jsx
const MyComponent = () => {

  const icon = 'miu/filled/warning'

  return <section className={ icon }>
    <div className="grid desktop:grid-cols-4 miu/filled/add-chart tablet:grid-cols-2 grid-cols-1 desktop:gap-6 gap-12 desktop:auto-rows-fr desktop:items-end">
      <i className="miu/filled/info"/>
      <span className='bg-adjust-tone-01/24 miu/filled/error'/>
      <div>
        <footer title="miu/filled/close"></footer>
      </div>
    </div>
  </section>
}
export default MyComponent
```

### Output

```css
@font-face {
  font-family: "iconsauce";
  src: url("data:font/truetype;charset=utf-8;base64,A...Z") format("truetype");
}

[class^="miu/"], [class*=" miu/"] {
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  font-family: "iconsauce" !important;
  font-size: 24px;
  font-style: normal;
  font-weight: 400;
  line-height: 1;
}

.miu\/filled\/add-chart::before { content: "\ea02" }
.miu\/filled\/close::before { content: "\ea03" }
.miu\/filled\/error::before { content: "\ea04" }
.miu\/filled\/info::before { content: "\ea05" }
.miu\/filled\/warning::before { content: "\ea08" }
```

---

## Config

Since v2.0.0 the configuration loader previously published as `@iconsauce/config`
is part of this package: `IconsauceConfig` and the `Config` type are exported
directly from `@iconsauce/core`.

Place config file in the root of your node project:

```js
module.exports = {
  content: [
    './static/**/*.{html,htm}',
    './templates/**/*.{js,jsx,ts,tsx}',
    './data/**/*.{json}',
    './layouts/**/*.{js}',
  ],
  fontSize: '24px',
  plugin: [
    require('@iconsauce/material-icons'),
  ],
}
```

For more info visit [Configuration wiki][config]

[config]: https://github.com/iconsauce/docs/wiki/Configuration

---
_Source: https://npm.io/package/@iconsauce/core · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
