![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
babel-plugin-named-asset-import
Advanced tools
Babel plugin for named asset imports in Create React App
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.
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';
This package provides similar functionality to babel-plugin-named-asset-import by allowing you to transform import statements for assets into a specified format. It can be configured to return a custom string or a JavaScript object based on the asset's filename, which can be useful for including assets in your bundle.
babel-plugin-inline-import allows you to import text files like GraphQL queries, CSS, or HTML as strings directly into your JavaScript code. This is somewhat similar to babel-plugin-named-asset-import, but instead of transforming the import statement, it inlines the content of the imported file.
While not specifically for assets, babel-plugin-import is designed to modify import statements in a way that can help with tree shaking and reducing bundle sizes. It can be used to import components from libraries in a more granular way, which is a different approach compared to handling static assets but still relates to import statement transformation.
FAQs
Babel plugin for named asset imports in Create React App
The npm package babel-plugin-named-asset-import receives a total of 0 weekly downloads. As such, babel-plugin-named-asset-import popularity was classified as not popular.
We found that babel-plugin-named-asset-import demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers 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 iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.