
Security News
pnpm 11.5 Adds Support for Recognizing npm Staged Publishes
pnpm 11.5 now recognizes npm staged publish approvals in release metadata, preventing those releases from being mistaken for lower-trust package publishes.
@svgr/rollup
Advanced tools
Rollup plugin for SVGR.
npm install @svgr/rollup
In your rollup.config.js:
{
plugins: [svgr()]
}
In your code:
import Star from './star.svg'
const App = () => (
<div>
<Star />
</div>
)
{
plugins: [svgr({ native: true })]
}
url pluginIt is possible to use it with url.
In your rollup.config.js:
{
plugins: [url(), svgr()]
}
In your code:
import starUrl, { ReactComponent as Star } from './star.svg'
const App = () => (
<div>
<img src={starUrl} alt="star" />
<Star />
</div>
)
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.
{
plugins: [svgr({ babel: false })]
}
MIT
rollup-plugin-image is a Rollup plugin that allows you to import image files (including SVGs) as data URIs. Unlike @svgr/rollup, it does not transform SVGs into React components but instead provides a way to include images directly in your bundle.
rollup-plugin-svg is a Rollup plugin that imports SVG files as strings. This plugin is useful if you want to manipulate SVG content as a string or use it in a different way than transforming it into a React component, which is the primary functionality of @svgr/rollup.
vite-plugin-svgr is a Vite plugin that transforms SVGs into React components, similar to @svgr/rollup. It is specifically designed for use with Vite, a build tool that aims to provide a faster and leaner development experience for modern web projects.
FAQs
SVGR Rollup plugin.
The npm package @svgr/rollup receives a total of 394,396 weekly downloads. As such, @svgr/rollup popularity was classified as popular.
We found that @svgr/rollup demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
pnpm 11.5 now recognizes npm staged publish approvals in release metadata, preventing those releases from being mistaken for lower-trust package publishes.

Security News
Federal audit finds NIST lacked a plan to clear the NVD backlog, wasted funds on duplicate work, and delayed use of CISA data.

Research
/Security News
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.