Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vite-plugin-svgr

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vite-plugin-svgr - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

lib/index.d.ts

17

package.json
{
"name": "vite-plugin-svgr",
"version": "1.0.0",
"version": "1.0.1",
"description": "Vite plugin to transform SVGs into React components",
"main": "lib/index.js",
"scripts": {
"dev": "tsc --watch",
"build": "tsc",
"prepublish": "npm run build"
},
"repository": "pd4d10/vite-plugin-svgr",

@@ -32,3 +27,9 @@ "files": [

"@svgr/core": "^6.2.0"
}
}
},
"scripts": {
"dev": "tsc --watch",
"build": "tsc",
"prepublish": "npm run build"
},
"readme": "# vite-plugin-svgr\n\n[![npm](https://img.shields.io/npm/v/vite-plugin-svgr.svg)](https://www.npmjs.com/package/vite-plugin-svgr)\n\nVite plugin to transform SVGs into React components. Uses [svgr](https://github.com/gregberge/svgr) under the hood.\n\n## Usage\n\n```js\n// vite.config.js\nimport svgrPlugin from 'vite-plugin-svgr'\n\nexport default {\n // ...\n plugins: [\n svgrPlugin({\n svgrOptions: {\n icon: true,\n // ...svgr options (https://react-svgr.com/docs/options/)\n },\n }),\n ],\n}\n```\n\nThen SVG files can be imported as React components, just like [create-react-app](https://create-react-app.dev/docs/adding-images-fonts-and-files#adding-svgs) does:\n\n```js\nimport { ReactComponent as Logo } from './logo.svg'\n```\n\nIf you are using TypeScript, `vite-plugin-svgr/client` can be added to `tsconfig.json`:\n\n```json\n{\n // ...\n \"compilerOptions\": {\n // ...\n \"types\": [\"vite-plugin-svgr/client\"]\n }\n}\n```\n\n## License\n\nMIT\n"
}
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