Socket
Socket
Sign inDemoInstall

@svgr/plugin-svgo

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@svgr/plugin-svgo

Optimize SVG


Version published
Weekly downloads
6.4M
decreased by-6.03%
Maintainers
1
Weekly downloads
 
Created

What is @svgr/plugin-svgo?

The @svgr/plugin-svgo package is a plugin for SVGR that allows you to optimize SVG files using SVGO during the transformation of SVGs into React components. This optimization can include removing unnecessary attributes, minifying the file, and more, which can result in smaller and more efficient SVG components for use in web applications.

What are @svgr/plugin-svgo's main functionalities?

Optimize SVGs during conversion to React components

This feature allows you to optimize SVG files using SVGO while converting them into React components. The code sample demonstrates how to use the SVGR core library with the SVGO plugin to optimize an SVG string.

import svgr from '@svgr/core';
import svgoPlugin from '@svgr/plugin-svgo';

const svgCode = '<svg>...</svg>';
const optimizedComponent = svgr(svgCode, { plugins: [svgoPlugin()] });
console.log(optimizedComponent);

Other packages similar to @svgr/plugin-svgo

Keywords

FAQs

Package last updated on 15 Aug 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc