# inline-svg-loader

> inline svg loader for webpack

Latest version **0.0.1** (published 2016-04-27) · 0 weekly downloads

## Install

```sh
npm install inline-svg-loader
pnpm add inline-svg-loader
yarn add inline-svg-loader
bun add inline-svg-loader
```

## Health

**Score 10/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2016-04-27 |
| First published | 2016-04-27 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 (+2 in 2 direct dependencies) |
| Install scripts | no |
| Author | Guanghui Ren |
| Maintainers | rguanghui |

## Links

- npm: https://www.npmjs.com/package/inline-svg-loader
- npm.io page: https://npm.io/package/inline-svg-loader

## Dependencies (4)

- [fastparse](https://npm.io/package/fastparse.md) ^1.0.0
- [source-map](https://npm.io/package/source-map.md) 0.1.x
- [loader-utils](https://npm.io/package/loader-utils.md) ~0.2.2
- [html-minifier](https://npm.io/package/html-minifier.md) 0.5.x

## Recent versions

- 0.0.1 (latest) — 2016-04-27

## README

# html loader for webpack

Just a quick hack for now, will improve on it soon...

It converts `<svg src="some.svg">` to an `<svg>` element with inlined contents of the file. The file is resolved through webpack.

Currently it only works as loader on top of `html-loader` and the regex is poor too.

You will need to setup loaders something like this:
``` javascript
{
  { test: "\.html$", loader: "inline-svg-loader!html-loader?attrs[]=svg:src" },
  { test: "\.svg$", loader: "raw-loader" }
}
```

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