# svg-icon-webpack-plugin

> svg-icon solution for webpack plugin

Latest version **0.0.6** (published 2018-12-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install svg-icon-webpack-plugin
pnpm add svg-icon-webpack-plugin
yarn add svg-icon-webpack-plugin
bun add svg-icon-webpack-plugin
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.6 |
| Published | 2018-12-14 |
| First published | 2018-12-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 25.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | springleo |
| Maintainers | springleo |
| Keywords | webpack, svg, icon |

## Links

- npm: https://www.npmjs.com/package/svg-icon-webpack-plugin
- Repository: https://github.com/lq782655835/svg-icon-webpack-plugin
- Homepage: https://github.com/lq782655835/svg-icon-webpack-plugin#readme
- Issues: https://github.com/lq782655835/svg-icon-webpack-plugin/issues
- npm.io page: https://npm.io/package/svg-icon-webpack-plugin

## Dependencies (1)

- [vue-svgicon](https://npm.io/package/vue-svgicon.md) ^3.2.2

## 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
- [@procore/core-icons](https://npm.io/package/@procore/core-icons.md) — 4.6K weekly downloads
- [@react-md/material-icons](https://npm.io/package/@react-md/material-icons.md) — 1.6K weekly downloads

## Recent versions

- 0.0.6 (latest) — 2018-12-14
- 0.0.5 — 2018-12-14
- 0.0.4 — 2018-12-14
- 0.0.3 — 2018-12-14
- 0.0.2 — 2018-12-14
- 0.0.1 — 2018-12-14

## README

# svg-icon-webpack-plugin

Auto convert svg to icon component data by webpack plugin。It's base on [vue-svgicon](https://github.com/MMF-FE/vue-svgicon) component for svg solution。

## Install

``` shell
npm install svg-icon-webpack-plugin --save-dev
```

## Usage

1. Configure webpack plugin。In vue.config.js
``` js
const SvgIconWebpackPlugin = require('svg-icon-webpack-plugin')

module.exports = {
    configureWebpack: {
        plugins: [
            new SvgIconWebpackPlugin({
                // config setting
                sourcePath: './src/assets/svg',
                targetPath: './src/assets/icon',
            })
        ]
    }
}
```

2. import result data in entry point file
``` shell
npm install vue-svgicon
```
``` js
import * as svgicon from 'vue-svgicon'
import './assets/icon'
Vue.use(svgicon)
```

3. use svgicon component in vue file
``` html
<svgicon name="arrow_down" width="50" height="50"></svgicon>
```

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