react-static-plugin-svgr

1.0.0 • Public • Published

react-static-plugin-svgr

A React-Static plugin that adds @svgr/webpack loader

Installation

In an existing react-static site run:

$ yarn add react-static-plugin-svgr

Then add the plugin to your static.config.js:

export default {
  plugins: ["react-static-plugin-svgr"]
};

With Options

export default {
  plugins: [
    [
      "react-static-plugin-svgr",
      {
        svgo: true,
        svgoOptions: {
          plugins: [
            {
              removeViewBox: false
            }
          ],
          memo: true
        // other options for the @svgr/webpack (https://react-svgr.com/docs/webpack)
      }
    ]
  ]
};

Readme

Keywords

none

Package Sidebar

Install

npm i react-static-plugin-svgr

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

2.35 kB

Total Files

7

Last publish

Collaborators

  • sleeplessbyte
  • hotwater