Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
@achmadk/vite-plugin-svgr
Advanced tools
Readme
Vite plugin to transform SVGs into React components. Uses the latest version of svgr under the hood.
// vite.config.js
import svgr from '@achmadk/vite-plugin-svgr'
export default {
// ...
plugins: [svgr()],
}
Then SVG files can be imported as React components, just like create-react-app does:
import { ReactComponent as Logo } from './logo.svg'
If you are using TypeScript, there is also a declaration helper for better type inference:
/// <reference types="vite-plugin-svgr/client" />
svgr({
// Set it to `true` to export React component as default.
// Notice that it will overrides the default behavior of Vite.
exportAsDefault: false,
// svgr options: https://react-svgr.com/docs/options/
svgrOptions: {
// ...
},
// esbuild options, to transform jsx to js
esbuildOptions: {
// ...
},
// A minimatch pattern, or array of patterns, which specifies the files in the build the plugin should include. By default all svg files will be included.
include: '**/*.svg',
// A minimatch pattern, or array of patterns, which specifies the files in the build the plugin should ignore. By default no files are ignored.
exclude: '',
})
MIT
FAQs
Vite plugin to transform SVGs into React components
The npm package @achmadk/vite-plugin-svgr receives a total of 4 weekly downloads. As such, @achmadk/vite-plugin-svgr popularity was classified as not popular.
We found that @achmadk/vite-plugin-svgr demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.