Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
babel-plugin-recharts
Advanced tools
A babel plugin help you import less Recharts modules.
$ npm i -D babel-plugin-recharts
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.
You can choose to either edit your custom Babel configuration or your Webpack configuration. Both options work..
{
"plugins": ["recharts"]
...
}
'module': {
'loaders': [{
'loader': 'babel-loader',
'test': /\.js$/,
'exclude': /node_modules/,
'query': {
'plugins': ['recharts'],
...
}
}]
}
Copyright (c) 2015-2021 Recharts Group
FAQs
Modular Recharts builds without the hassle.
The npm package babel-plugin-recharts receives a total of 8,286 weekly downloads. As such, babel-plugin-recharts popularity was classified as popular.
We found that babel-plugin-recharts demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.