Socket
Socket
Sign inDemoInstall

babel-plugin-named-asset-import

Package Overview
Dependencies
Maintainers
5
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-named-asset-import

Babel plugin for named asset imports in Create React App


Version published
Weekly downloads
3.2M
increased by4.38%
Maintainers
5
Weekly downloads
 
Created

What is babel-plugin-named-asset-import?

The babel-plugin-named-asset-import package is a Babel plugin that allows you to transform certain import statements with a specific naming convention into a different form. This is particularly useful when working with asset files like images, stylesheets, and other static files in a JavaScript or TypeScript project. It can help with customizing the way assets are imported and processed during the build process.

What are babel-plugin-named-asset-import's main functionalities?

Transforming asset imports

This feature allows you to import an asset, such as an SVG file, in two different forms: as a URL and as a React component. The plugin will transform the import statement so that you can use the asset both as a source for an image tag and as a component in your JSX.

import logoUrl, { ReactComponent as Logo } from './logo.svg';

Other packages similar to babel-plugin-named-asset-import

FAQs

Package last updated on 14 Dec 2021

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc