Security News
PyPI Introduces Digital Attestations to Strengthen Python Package Security
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
@parcel/transformer-svg
Advanced tools
@parcel/transformer-svg is a plugin for Parcel, a web application bundler. This transformer allows you to import SVG files and use them in your JavaScript, CSS, or HTML files. It can optimize SVG files, inline them, or convert them to React components.
Importing SVG as URL
This feature allows you to import an SVG file as a URL, which can then be used in your HTML or CSS.
import logoUrl from './logo.svg';
console.log(logoUrl);
Inlining SVG
This feature allows you to import an SVG file and inline its content directly into your HTML.
import logo from './logo.svg';
document.body.innerHTML = logo;
Converting SVG to React Component
This feature allows you to import an SVG file as a React component, which can then be used in your React application.
import { ReactComponent as Logo } from './logo.svg';
function App() {
return <Logo />;
}
SVGR is a tool that transforms SVGs into React components. It is highly customizable and can be used as a CLI tool, webpack loader, or Node.js library. Compared to @parcel/transformer-svg, SVGR is more focused on React and offers more customization options for the transformation process.
svg-url-loader is a webpack loader that loads SVG files as URLs. It can also optimize SVG files using SVGO. Compared to @parcel/transformer-svg, svg-url-loader is more focused on URL loading and optimization, and it is specifically designed for use with webpack.
react-svg-loader is a webpack loader that transforms SVGs into React components. It also optimizes SVG files using SVGO. Compared to @parcel/transformer-svg, react-svg-loader is specifically designed for React and webpack, offering a similar feature set but with a focus on React component transformation.
[2.13.0] - 2024-11-12
Core
Bundler
JavaScript
process.env
replacer to use SWC VisitMut – Details__filename
and __dirname
replace to use SWC VisitMut – DetailsResolver
TypeScript
SASS
SVG
Image
Vue
Web Extensions
FAQs
Unknown package
We found that @parcel/transformer-svg 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
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.