
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
gatsby-transformer-svg-sprites
Advanced tools
Gatsby plugin to generate SVG sprites from GraphQL sources
Gatsby plugin to generate SVG sprites from GraphQL sources.
npm install gatsby-transformer-svg-sprites
/* gatsby-config.js */
module.exports = {
plugins: [
{
resolve: 'gatsby-transformer-svg-sprites',
options: {
/* gatsby-transformer-svg-sprites options here */
}
}
]
}
import { graphql } from 'gatsby'
import React from 'react'
const Page = ({ data }) => (
<>
{data.allFile.nodes.map(node => {
const svg = node.childSvgSprites
return svg && (
<svg key={svg.url} viewBox={svg.viewBox}>
<use xlinkHref={svg.url}/>
</svg>
)
})}
</>
)
export default Page
export const query = graphql`
query {
allFile {
nodes {
childSvgSprites {
url
viewBox
}
}
}
}
`
Type: boolean
. Default: process.env.NODE_ENV === 'production'
.
Defines if the sprites file should be minified. By default, it is enabled on production environments.
Type: string
or Array
. Default: ''
.
A path or an array of paths that shouldn't be included in the sprites file. It supports glob patterns.
Any other option passed to gatsby-transformer-svg-sprites
will be passed to
svg-mixer
— more info about its options can be found here.
FAQs
Gatsby plugin to generate SVG sprites from GraphQL sources
The npm package gatsby-transformer-svg-sprites receives a total of 1 weekly downloads. As such, gatsby-transformer-svg-sprites popularity was classified as not popular.
We found that gatsby-transformer-svg-sprites 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.