babel-plugin-grommet

WebJar for babel-plugin-grommet

License

License

GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

babel-plugin-grommet
Last Version

Last Version

0.5.2
Release Date

Release Date

Type

Type

jar
Description

Description

babel-plugin-grommet
WebJar for babel-plugin-grommet
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/grommet/babel-plugin-grommet

Download babel-plugin-grommet

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/babel-plugin-grommet/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>babel-plugin-grommet</artifactId>
    <version>0.5.2</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/babel-plugin-grommet/
implementation 'org.webjars.npm:babel-plugin-grommet:0.5.2'
// https://jarcasting.com/artifacts/org.webjars.npm/babel-plugin-grommet/
implementation ("org.webjars.npm:babel-plugin-grommet:0.5.2")
'org.webjars.npm:babel-plugin-grommet:jar:0.5.2'
<dependency org="org.webjars.npm" name="babel-plugin-grommet" rev="0.5.2">
  <artifact name="babel-plugin-grommet" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='babel-plugin-grommet', version='0.5.2')
)
libraryDependencies += "org.webjars.npm" % "babel-plugin-grommet" % "0.5.2"
[org.webjars.npm/babel-plugin-grommet "0.5.2"]

Dependencies

compile (2)

Group / Artifact Type Version
org.webjars.npm : babel-types jar [6.25.0,7)
org.webjars.npm : find jar [0.2.7,0.3)

Project Modules

There are no modules declared in this project.

babel-plugin-grommet

Babel plugin to convert member style imports to default imports.

⚠️ 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';

Install

npm install babel-plugin-grommet --save-dev

or

yarn add babel-plugin-grommet --dev

Usage

Add the plugin to your .babelrc

{
  "plugins": ["grommet"]
}

Why?

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.

org.webjars.npm

grommet

Streamline the way you develop apps

Versions

Version
0.5.2