Gathering detailed insights and metrics for @newhighsco/next-plugin-svgr
Gathering detailed insights and metrics for @newhighsco/next-plugin-svgr
npm install @newhighsco/next-plugin-svgr
Typescript
Module System
Node Version
NPM Version
31.3
Supply Chain
50.4
Quality
93.4
Maintenance
100
Vulnerability
91.6
License
JavaScript (100%)
Total Downloads
451,387
Last Day
781
Last Week
3,403
Last Month
15,147
Last Year
216,214
69 Stars
1,736 Commits
3 Forks
1 Watching
1 Branches
4 Contributors
Latest Version
3.0.152
Package Id
@newhighsco/next-plugin-svgr@3.0.152
Unpacked Size
4.58 kB
Size
1.96 kB
File Count
4
NPM Version
10.5.0
Node Version
20.18.1
Publised On
17 Jan 2025
Cumulative downloads
Total Downloads
Last day
20.2%
781
Compared to previous day
Last week
-5.1%
3,403
Compared to previous week
Last month
-14%
15,147
Compared to previous month
Last year
100.7%
216,214
Compared to previous year
3
1
Next.js plugin for transforming SVGs into React components using SVGR
Install Next.js and @newhighsco/next-plugin-svgr
:
npm install --save next @newhighsco/next-plugin-svgr
Create a next.config.js
in your project:
1// next.config.js
2const withSvgr = require('@newhighsco/next-plugin-svgr')
3module.exports = withSvgr({
4 svgrOptions: {
5 /* config options here */
6 }
7})
In your code:
1import starUrl, { ReactComponent as Star } from './star.svg' 2 3const App = () => ( 4 <> 5 <img src={starUrl} alt="star" /> 6 <Star /> 7 </> 8)
In your next-env.d.ts
file (or in another type declaration file of your choosing that's within the include
section of your tsconfig.js
), simply add the following:
1declare module '*.svg' { 2 import { FC, SVGProps } from 'react'; 3 export const ReactComponent: FC<SVGProps<SVGSVGElement>>; 4 5 const src: string; 6 export default src; 7}
This notifies the compiler of the 2 possible ways you're able to import and use SVG files with this plugin integrated.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
30 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10
Reason
Found 2/30 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
license file not detected
Details
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
16 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-01-27
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More