2.1.4 • Published 5 years ago

@korzhyk/rollup-plugin-preact-svg v2.1.4

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

rollup-plugin-react-svg

Load SVG images as React Components

Install

npm i rollup-plugin-react-svg --save-dev

# or with yarn

yarn add rollup-plugin-react-svg --dev

Usage

// rollup.config.js
import reactSvg from "rollup-plugin-react-svg";

export default {
  ...opts,
  plugins: [
    ...plugins,

    reactSvg({
      // svgo options
      svgo: {
        plugins: [], // passed to svgo
        multipass: true
      },

      // whether to output jsx
      jsx: false,

      // include: string
      include: null,

      // exclude: string
      exclude: null
    })
  ]
}

LICENSE

MIT