
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
babel-plugin-grommet
Advanced tools
Babel plugin to transform member style imports into default imports
Babel plugin to convert member style imports to default imports.
:warning: Experimental: This plugin only works with Grommet Next (current branch for Grommet 2.0). DO NOT use this with Grommet 1.X.
Transforms this:
import { Grommet, Button } from 'grommet';
into this:
import Grommet from 'grommet/components/grommet';
import Button from 'grommet/components/button';
npm install babel-plugin-grommet --save-dev
or
yarn add babel-plugin-grommet --dev
Add the plugin to your .babelrc
{
"plugins": ["grommet"]
}
Grommet Next already adds all the bits and pieces for tree shaking to work. But most module bundlers today still don't exclude the modules that are not being used. We tested our library against Webpack and RollUp and both of them include all components that are not being used just for the fact that it has been imported like this import { Button } from 'grommet'
. This is why you need to use this plugin.
FAQs
Babel plugin to transform member style imports into default imports
The npm package babel-plugin-grommet receives a total of 13 weekly downloads. As such, babel-plugin-grommet popularity was classified as not popular.
We found that babel-plugin-grommet demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.