
Security News
OWASP 2025 Top 10 Adds Software Supply Chain Failures, Ranked Top Community Concern
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.
@tinkoff/babel-plugin-lodash
Advanced tools
Transform lodash imports to include into bundle only imported functions
This plugin transforms lodash imports to include into bundle only imported functions.
npm install --save-dev @tinkoff/babel-plugin-lodash
yarn add --dev @tinkoff/babel-plugin-lodash
In
import _ from "lodash";
import { add } from "lodash/fp";
import { slice } from "lodash-es";
const addOne = add(1);
_.map([1, 2, 3], addOne);
slice([1, 2, 3], 2);
Out
import _add from "lodash/fp/add";
import _map from "lodash/map";
import _slice from "lodash-es/slice";
const addOne = _add(1);
_map([1, 2, 3], addOne);
_slice([1, 2, 3], 2);
.babelrc
{
"plugins": ["@tinkoff/babel-plugin-lodash"]
}
$ babel --plugins @tinkoff/babel-plugin-lodash script.js
require("@babel/core").transformSync(code, {
plugins: ["@tinkoff/babel-plugin-lodash"],
});
ensureModuleExistsboolean, defaults to false.
When this option is enabled, plugin tries to resolve path to imported lodash module using require.resolve(). If the
module can not be found, an error is thrown. Usually such check is done out of box by bundler (e.g. webpack) or
typescript. Enabling this option may lead to decreasing performance.
In
import _ from "lodash";
_.slice([1, 2], 1);
_.unknownFunc();
Out
import _slice from "lodash/slice"; // OK
import _unknownFunc from "lodash/unknownFunc"; // ERROR
_slice([1, 2], 1);
_unknownFunc();
lodash, lodash/fp, lodash-esFAQs
Transform lodash imports to include into bundle only imported functions
The npm package @tinkoff/babel-plugin-lodash receives a total of 123 weekly downloads. As such, @tinkoff/babel-plugin-lodash popularity was classified as not popular.
We found that @tinkoff/babel-plugin-lodash demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 17 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
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.