# esbuild-plugin-svgr

> A plugin for esbuild that enables importing *.svg files as React components.

Latest version **3.1.1** (published 2025-04-11) · MIT license · 82.6K weekly downloads

## Install

```sh
npm install esbuild-plugin-svgr
pnpm add esbuild-plugin-svgr
yarn add esbuild-plugin-svgr
bun add esbuild-plugin-svgr
```

## Health

**Score 40/100 (D)** — status: maintenance-mode.

Positive: has types; no vulnerabilities.

Warnings: no esm support.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.1.1 |
| Published | 2025-04-11 |
| First published | 2021-01-24 |
| Weekly downloads | 82.6K |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 39 |
| Author | Kazi Jawad |
| Maintainers | kazijawad |

## Links

- npm: https://www.npmjs.com/package/esbuild-plugin-svgr
- Repository: https://github.com/kazijawad/esbuild-plugin-svgr
- Homepage: https://github.com/kazijawad/esbuild-plugin-svgr#readme
- Issues: https://github.com/kazijawad/esbuild-plugin-svgr/issues
- npm.io page: https://npm.io/package/esbuild-plugin-svgr

## Dependencies (2)

- [@svgr/core](https://npm.io/package/@svgr/core.md) ^8.1.0
- [@svgr/plugin-jsx](https://npm.io/package/@svgr/plugin-jsx.md) ^8.1.0

## Recent versions

- 3.1.1 (latest) — 2025-04-11
- 3.1.0 — 2024-11-15
- 3.0.0 — 2024-10-16
- 2.1.0 — 2023-08-12
- 2.0.0 — 2023-05-16
- 1.1.0 — 2023-03-22
- 1.0.1 — 2022-04-14
- 1.0.0 — 2021-12-15
- 0.0.3 — 2021-07-23
- 0.0.2 — 2021-06-18
- 0.0.1 — 2021-01-24

## README

# esbuild-plugin-svgr

A plugin for [esbuild](https://github.com/evanw/esbuild) that adds support for `*.svg` file imports as React components.
The plugin is built on top of [SVGR](https://github.com/gregberge/svgr).

## Installation

The plugin can be installed using [npm](https://www.npmjs.com).

```bash
npm i -D esbuild-plugin-svgr
```

## Basic Usage

Please reference the [example](example/) directory for basic usage.

## License

This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details.

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