
Product
Introducing Module Reachability: Focus on the Vulnerabilities That Matter
Module Reachability filters out unreachable CVEs so you can focus on vulnerabilities that actually matter to your application.
Plugin for Next to automatically be able to transform svg
files into components using the excellent svgr
library.
npm install --save next-svgr
Or using yarn:
yarn add next-svgr
Then, import the library in your next.config.js
file.
// next.config.js
const withSvgr = require("next-svgr");
module.exports = withSvgr({
// your config for other plugins or the general next.js here...
});
Or you can use it with next-compose-plugins
for a cleaner configuration.
// next.config.js
const withPlugins = require("next-compose-plugins");
const withSvgr = require("next-svgr");
module.exports = withPlugins([
withSvgr
// your other plugins here
]);
You can now start importing your SVG files as if they were components:
import MyIcon from "./myicon.svg";
export default () => (
<div>
<MyIcon />
</div>
);
Please check the documentation of svgr for more examples.
0.0.2 - 2019-02-06
FAQs
Plugin for NextJS to use SVG with svgr.
The npm package next-svgr receives a total of 3,566 weekly downloads. As such, next-svgr popularity was classified as popular.
We found that next-svgr 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.
Product
Module Reachability filters out unreachable CVEs so you can focus on vulnerabilities that actually matter to your application.
Product
Socket is introducing a new way to organize repositories and apply repository-specific security policies.
Research
Security News
Socket researchers uncovered malicious npm and PyPI packages that steal crypto wallet credentials using Google Analytics and Telegram for exfiltration.