rollup-plugin-react-svg

3.0.3 • Public • Published

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

/rollup-plugin-react-svg/

    Package Sidebar

    Install

    npm i rollup-plugin-react-svg

    Weekly Downloads

    2,294

    Version

    3.0.3

    License

    MIT

    Unpacked Size

    3.62 kB

    Total Files

    4

    Last publish

    Collaborators

    • boopathi