0.2.0 • Published 1 year ago

@rambler-tech/razzle-svgr v0.2.0

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

SVGR Plugin

Transform SVGs into React components

Install

npm install -D @rambler-tech/razzle-svgr

or

yarn add -D @rambler-tech/razzle-svgr

Usage

Add the plugin to razzle.config.js

const SvgrPlugin = require('@rambler-tech/razzle-svgr')

module.exports = {
  plugins: [
    SvgrPlugin()
  ],
  modifyWebpackConfig({webpackConfig}) {
    // ...
    return webpackConfig
  }
}

It's also possible to provide args from svgr plugin

const SvgrPlugin = require('@rambler-tech/razzle-svgr')

module.exports = {
  plugins: [
    SvgrPlugin({
      native: true,
    })
  ],
  modifyWebpackConfig({webpackConfig}) {
    // ...
    return webpackConfig
  }
}

Full list of options are avaible here

0.2.0

1 year ago

0.1.0

2 years ago