{"id":20558572,"url":"https://github.com/recharts/babel-plugin-recharts","last_synced_at":"2025-04-14T13:43:03.276Z","repository":{"id":42221943,"uuid":"59114683","full_name":"recharts/babel-plugin-recharts","owner":"recharts","description":null,"archived":false,"fork":false,"pushed_at":"2023-10-20T05:22:50.000Z","size":938,"stargazers_count":119,"open_issues_count":11,"forks_count":16,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-03-28T02:46:54.050Z","etag":null,"topics":["babel-plugin","recharts"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/recharts.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2016-05-18T12:44:42.000Z","updated_at":"2024-11-06T19:14:39.000Z","dependencies_parsed_at":"2023-02-06T11:15:50.332Z","dependency_job_id":"6a5b7fa1-9e3d-470b-acee-d39d72c3b390","html_url":"https://github.com/recharts/babel-plugin-recharts","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/recharts%2Fbabel-plugin-recharts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/recharts%2Fbabel-plugin-recharts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/recharts%2Fbabel-plugin-recharts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/recharts%2Fbabel-plugin-recharts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/recharts","download_url":"https://codeload.github.com/recharts/babel-plugin-recharts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248890167,"owners_count":21178377,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["babel-plugin","recharts"],"created_at":"2024-11-16T03:44:35.600Z","updated_at":"2025-04-14T13:43:03.244Z","avatar_url":"https://github.com/recharts.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# babel-plugin-recharts\n\n## **Note:** This project is currently unmaintained and does not work with recharts 2.0 and above\n\nA babel plugin help you import less Recharts modules.\n\n[![npm version](https://badge.fury.io/js/babel-plugin-recharts.png)](https://badge.fury.io/js/babel-plugin-recharts)\n[![build status](https://travis-ci.org/recharts/babel-plugin-recharts.svg)](https://travis-ci.org/recharts/babel-plugin-recharts)\n[![npm downloads](https://img.shields.io/npm/dt/babel-plugin-recharts.svg?style=flat-square)](https://www.npmjs.com/package/babel-plugin-recharts)\n\n## install\n\n```sh\n$ npm i -D babel-plugin-recharts\n```\n\n## Example\n\nThe plugin automatically compiles `recharts` import, like this:\n\n```jsx\nimport { Line, Area, Pie, Treemap, Cell } from 'recharts';\n```\n\nbabel plugin will be parsed into:\n\n```js\n\"use strict\";\n\nrequire(\"recharts/lib/polyfill.js\");\n\nvar _Line = _interopRequireDefault(require(\"recharts/lib/cartesian/Line.js\"));\n\nvar _Area = _interopRequireDefault(require(\"recharts/lib/cartesian/Area.js\"));\n\nvar _Treemap = _interopRequireDefault(require(\"recharts/lib/chart/Treemap.js\"));\n\nvar _Pie = _interopRequireDefault(require(\"recharts/lib/polar/Pie.js\"));\n\nvar _Cell = _interopRequireDefault(require(\"recharts/lib/component/Cell.js\"));\n\nvar _recharts = _interopRequireDefault(require(\"recharts\"));\n\nfunction _interopRequireDefault(obj) { return obj \u0026\u0026 obj.__esModule ? obj : { default: obj }; }\n```\n\nHence you end up loading less modules.\n\n## Usage\n\nYou can choose to *either* edit your custom Babel configuration *or* your Webpack configuration. [Both options work.](https://github.com/recharts/babel-plugin-recharts/issues/7).\n\n### .babelrc\n\n```js\n{\n  \"plugins\": [\"recharts\"]\n  ...\n}\n```\n\n### webpack.config.js\n\n```js\n'module': {\n  'loaders': [{\n    'loader': 'babel-loader',\n    'test': /\\.js$/,\n    'exclude': /node_modules/,\n    'query': {\n      'plugins': ['recharts'],\n      ...\n    }\n  }]\n}\n```\n\n## Limitations\n\n* You must use ES2015 imports to load recharts\n\n## License\n\n[MIT](http://opensource.org/licenses/MIT)\n\nCopyright (c) 2015-2021 Recharts Group\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frecharts%2Fbabel-plugin-recharts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frecharts%2Fbabel-plugin-recharts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frecharts%2Fbabel-plugin-recharts/lists"}