All Projects → recharts → Babel Plugin Recharts

recharts / Babel Plugin Recharts

Licence: mit

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Babel Plugin Recharts

Snackui
SnackUI 🍑 - the final React style library. With an *optimizing compiler* that lets you write views naturally, with easier DX, working on native and web at once, all while being faster than hand-rolling your own CSS.
Stars: ✭ 55 (-49.07%)
Mutual labels:  babel-plugin
Babel Plugin Optimize Clsx
Babel plugin to optimize the use of clsx, classnames, and other libraries with a compatible API
Stars: ✭ 80 (-25.93%)
Mutual labels:  babel-plugin
Idx.macro
a 'babel-macros' version of 'babel-plugin-idx'
Stars: ✭ 90 (-16.67%)
Mutual labels:  babel-plugin
Tinker.macro
Evaluate Laravel code at build-time, via Laravel Tinker
Stars: ✭ 56 (-48.15%)
Mutual labels:  babel-plugin
Babel Plugin Direct Import
Babel plugin to cherry-pick ES module imports.
Stars: ✭ 69 (-36.11%)
Mutual labels:  babel-plugin
Compiled
A familiar and performant compile time CSS-in-JS library for React.
Stars: ✭ 1,235 (+1043.52%)
Mutual labels:  babel-plugin
Xwasm
[Work In Progress] WebAssembly Packager and WASM tooling for modern frontend
Stars: ✭ 45 (-58.33%)
Mutual labels:  babel-plugin
Babel Plugin I18next Extract
Babel plugin that statically extracts i18next and react-i18next translation keys.
Stars: ✭ 93 (-13.89%)
Mutual labels:  babel-plugin
Babel Plugin Captains Log
Babel plugin that injects helpful details into console statements
Stars: ✭ 80 (-25.93%)
Mutual labels:  babel-plugin
Generator Babel Plugin
Babel Plugin generator for Yeoman
Stars: ✭ 88 (-18.52%)
Mutual labels:  babel-plugin
Babel Plugin Partial Application
[DEPRECATED] Please use https://github.com/citycide/param.macro
Stars: ✭ 60 (-44.44%)
Mutual labels:  babel-plugin
Astexplorer.app
https://astexplorer.net with ES Modules support and Hot Reloading
Stars: ✭ 65 (-39.81%)
Mutual labels:  babel-plugin
Modify Babel Preset
💫 Create a modified babel preset based on an an existing preset.
Stars: ✭ 85 (-21.3%)
Mutual labels:  babel-plugin
Babel Plugin Css Prop
Babel plugin to transpile `css` prop to a styled component. (Experimental)
Stars: ✭ 56 (-48.15%)
Mutual labels:  babel-plugin
Jsx Control Statements
Neater If and For for React JSX
Stars: ✭ 1,305 (+1108.33%)
Mutual labels:  babel-plugin
Babel Plugin Root Import
Add the opportunity to import modules by the root path
Stars: ✭ 1,084 (+903.7%)
Mutual labels:  babel-plugin
Catom
A 0 runtime CSS in JS library
Stars: ✭ 84 (-22.22%)
Mutual labels:  babel-plugin
Babel Plugin Jsx Adopt
Stars: ✭ 94 (-12.96%)
Mutual labels:  babel-plugin
Babel Plugin React Persist
Automatically useCallback() & useMemo(); memoize inline functions
Stars: ✭ 91 (-15.74%)
Mutual labels:  babel-plugin
Babel Plugin Stateful Functional React Components
Stateful functional React components without runtime overhead
Stars: ✭ 86 (-20.37%)
Mutual labels:  babel-plugin

babel-plugin-recharts

A babel plugin help you import less Recharts modules.

npm version build status npm downloads

install

$ npm i -D babel-plugin-recharts

Example

The plugin automatically compiles recharts import, like this:

import { Line, Area, Pie, Treemap, Cell } from 'recharts';

babel plugin will be parsed into:

"use strict";

require("recharts/lib/polyfill.js");

var _Line = _interopRequireDefault(require("recharts/lib/cartesian/Line.js"));

var _Area = _interopRequireDefault(require("recharts/lib/cartesian/Area.js"));

var _Treemap = _interopRequireDefault(require("recharts/lib/chart/Treemap.js"));

var _Pie = _interopRequireDefault(require("recharts/lib/polar/Pie.js"));

var _Cell = _interopRequireDefault(require("recharts/lib/component/Cell.js"));

var _recharts = _interopRequireDefault(require("recharts"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

Hence you end up loading less modules.

Usage

.babelrc

{
  "plugins": ["recharts"]
  ...
}

webpack.config.js

'module': {
  'loaders': [{
    'loader': 'babel-loader',
    'test': /\.js$/,
    'exclude': /node_modules/,
    'query': {
      'plugins': ['recharts'],
      ...
    }
  }]
}

Limitations

  • You must use ES2015 imports to load recharts

License

MIT

Copyright (c) 2015-2018 Recharts Group

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].