vite-plugin-svgr
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"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" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
6436
6
62
0
2