Gathering detailed insights and metrics for @exodus/svgr-rollup
Gathering detailed insights and metrics for @exodus/svgr-rollup
Gathering detailed insights and metrics for @exodus/svgr-rollup
Gathering detailed insights and metrics for @exodus/svgr-rollup
Transform SVGs into React components 🦁
npm install @exodus/svgr-rollup
Typescript
Module System
Min. Node Version
52.7
Supply Chain
24.3
Quality
81.5
Maintenance
100
Vulnerability
99.3
License
TypeScript (64.93%)
MDX (20.67%)
JavaScript (14.4%)
Total Downloads
1,448
Last Day
3
Last Week
12
Last Month
38
Last Year
384
MIT License
10,840 Stars
650 Commits
430 Forks
35 Watchers
3 Branches
129 Contributors
Updated on Jul 02, 2025
Minified
Minified + Gzipped
Latest Version
6.3.1-exodus-1
Package Id
@exodus/svgr-rollup@6.3.1-exodus-1
Unpacked Size
21.82 kB
Size
6.15 kB
File Count
8
Cumulative downloads
Total Downloads
Last Day
0%
3
Compared to previous day
Last Week
50%
12
Compared to previous week
Last Month
123.5%
38
Compared to previous month
Last Year
-13.9%
384
Compared to previous year
Rollup plugin for SVGR.
npm install @svgr/rollup --save-dev
In your rollup.config.js
:
1{ 2 plugins: [svgr()] 3}
In your code:
1import Star from './star.svg' 2 3const App = () => ( 4 <div> 5 <Star /> 6 </div> 7)
1{ 2 plugins: [svgr({ native: true })] 3}
url
pluginIt is possible to use it with url
.
In your rollup.config.js
:
1{ 2 plugins: [url(), svgr()] 3}
In your code:
1import starUrl, { ReactComponent as Star } from './star.svg' 2 3const App = () => ( 4 <div> 5 <img src={starUrl} alt="star" /> 6 <Star /> 7 </div> 8)
The named export defaults to ReactComponent
, but can be customized with the namedExport
option.
Please note that by default, @svgr/rollup
will try to export the React Component via default export if there is no other plugin handling svg files with default export. When there is already any other plugin using default export for svg files, @svgr/rollup
will always export the React component via named export.
If you prefer named export in any case, you may set the exportType
option to named
.
By default, @svgr/rollup
applies a babel transformation with optimized configuration. In some case you may want to apply a custom one (if you are using Preact for an example). You can turn off Babel transformation by specifying babel: false
in options.
1{ 2 plugins: [svgr({ babel: false })] 3}
MIT
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
GitHub workflow tokens follow principle of least privilege
Details
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 18/28 approved changesets -- score normalized to 6
Reason
0 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
81 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-06-23
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