# @newhighsco/next-plugin-svgr

> Next.js plugin for transforming SVGs into React components using SVGR

Latest version **3.0.176** (published 2026-07-27) · ISC license · 0 weekly downloads

## Install

```sh
npm install @newhighsco/next-plugin-svgr
pnpm add @newhighsco/next-plugin-svgr
yarn add @newhighsco/next-plugin-svgr
bun add @newhighsco/next-plugin-svgr
```

## Health

**Score 50/100 (C)** — status: active.

Positive: no vulnerabilities; high maintenance score.

Warnings: low downloads; no types; no esm support.

## Facts

| | |
|---|---|
| Version | 3.0.176 |
| Published | 2026-07-27 |
| First published | 2020-04-14 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 3.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 69 |
| Author | New High Score |
| Maintainers | benedfit, newhighsco-bot |

## Links

- npm: https://www.npmjs.com/package/@newhighsco/next-plugin-svgr
- Repository: https://github.com/newhighsco/next
- Homepage: https://github.com/newhighsco/next/tree/main/packages/next-plugin-svgr#readme
- Issues: https://github.com/newhighsco/next/issues
- npm.io page: https://npm.io/package/@newhighsco/next-plugin-svgr

## Dependencies (3)

- [url-loader](https://npm.io/package/url-loader.md) 4.1.1
- [file-loader](https://npm.io/package/file-loader.md) 6.2.0
- [@svgr/webpack](https://npm.io/package/@svgr/webpack.md) 8.1.0

## Recent versions

- 3.0.176 (latest) — 2026-07-27
- 3.0.175 — 2026-07-25
- 3.0.174 — 2026-07-21
- 3.0.173 — 2026-07-01
- 3.0.172 — 2026-06-10
- 3.0.171 — 2026-06-02
- 3.0.170 — 2026-05-07
- 3.0.169 — 2026-05-06
- 3.0.168 — 2026-04-16
- 3.0.167 — 2026-04-08
- 3.0.166 — 2026-04-01
- 3.0.165 — 2026-03-21
- 3.0.164 — 2026-03-18
- 3.0.163 — 2026-03-17
- 3.0.162 — 2026-01-28
- … 170 more at https://npm.io/package/@newhighsco/next-plugin-svgr/versions

## README

# next-plugin-svgr [![NPM version](https://img.shields.io/npm/v/@newhighsco/next-plugin-svgr.svg)](https://www.npmjs.com/package/@newhighsco/next-plugin-svgr)

[Next.js](https://nextjs.org/) plugin for transforming SVGs into React components using [SVGR](https://react-svgr.com/)

## Installation

Install Next.js and `@newhighsco/next-plugin-svgr`:

```
npm install --save next @newhighsco/next-plugin-svgr
```

## Usage

Create a `next.config.js` in your project:

```js
// next.config.js
const withSvgr = require('@newhighsco/next-plugin-svgr')
module.exports = withSvgr({
  svgrOptions: {
    /* config options here */
  }
})
```

In your code:

```jsx
import starUrl, { ReactComponent as Star } from './star.svg'

const App = () => (
  <>
    <img src={starUrl} alt="star" />
    <Star />
  </>
)
```

## With TypeScript

In your `next-env.d.ts` file (or in another type declaration file of your choosing that's within the `include` section of your `tsconfig.js`), simply add the following:

```tsx
declare module '*.svg' {
  import { FC, SVGProps } from 'react';
  export const ReactComponent: FC<SVGProps<SVGSVGElement>>;

  const src: string;
  export default src;
}
```

This notifies the compiler of the 2 possible ways you're able to import and use SVG files with this plugin integrated.

## Options

[See options supported by SVGR](https://react-svgr.com/docs/options/)

## [CHANGELOG](CHANGELOG.md)

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