Skip to content
PluginStats

@optimize-lodash/rollup-plugin weekly downloads statistics

By optimize-lodash · npm · Vite plugins

Rewrite lodash imports with Rollup for improved tree-shaking.

View on npm Fresh · Dec 6, 2026

@optimize-lodash/rollup-plugin has 1,555,888 recorded weekly downloads on npm, an increase of 15.3% over the past 30 days, ranking #245 of 3,247 tracked listings.

Weekly downloads
1,555,888
Official API · Dec 5, 2026
7-day growth
+32.6%
+382.3K weekly downloads
30-day growth
+15.3%
+206K weekly downloads
90-day growth
+109%
+810K weekly downloads
Rank
#245
▲ 28 in 7 days

About @optimize-lodash/rollup-plugin

Optimize lodash imports with Rollup.js

npm node-current npm peer dependency version compatible with Vite compatible with rolldown GitHub Workflow Status license Codecov GitHub last commit

There are multiple issues surrounding tree-shaking of lodash. Minifiers, even with dead-code elimination, cannot currently solve this problem. Check out the test showing this plugin can reduce bundle size by 70% for an example input (and that's with a minifier enabled!). With this plugin, bundled code output will only include the specific lodash methods your code requires.

There is also an option to use lodash-es for projects which ship ESM: transform all your lodash imports to use lodash-es which is tree-shakable.

Version 6.x introduces a new feature: imports of "modularized" lodash packages, such as lodash.camelcase are rewritten to use optimized imports of lodash or lodash-es. This can significantly reduce bundle size when using third-party dependencies that require these modularized imports: you no longer have to ship copies of the same lodash functions simply because one comes from lodash and another from lodash.camelcase. Applying this to kebabCase saves ~3.5kB after minification.

This input
import { isNil, isString } from "lodash";
import { padStart as padStartFp } from "lodash/fp";
import kebabCase from "lodash.kebabcase";
Becomes this output
import isNil from "lodash/isNil.js";
import isString from "lodash/isString.js";
import padStartFp from "lodash/fp/padStart.js";
import kebabCase from "lodash/kebabCase.js";

useLodashEs for ES Module Output

While lodash-es is not usable in CommonJS modules, some projects only need ESM output or build both CommonJS and ESM outputs.

In these cases, you can optimize by transforming lodash imports to lodash-es imports:

Your source input
import { isNil } from "lodash";
import kebabCase from "lodash.kebabcase";
CommonJS output
import isNil from "lodash/isNil.js";
import kebabCase from "lodash/kebabCase.js";
ES output (with useLodashEs: true)
import { isNil } from "lodash-es";
import { kebabCase } from "lodash-es";

Individual lodash.* Method Packages

Imports from individual lodash method packages like lodash.isnil or lodash.flattendeep are transformed to use the optimized import path of lodash or lodash-es, consolidating your lodash usage to a single, tree-shakable ESM package.

Your source input
import isNil from "lodash.isnil";
import flattenDeep from "lodash.flattendeep";
CommonJS output
import isNil from "lodash/isNil.js";
import flattenDeep from "lodash/flattenDeep.js";
ES output (with useLodashEs: true)
import { isNil } from "lodash-es";
import { flattenDeep } from "lodash-es";

Aliased local names are supported (import checkNull from "lodash.isnil" becomes import checkNull from "lodash/isNil.js").

Usage

import { optimizeLodashImports } from "@optimize-lodash/rollup-plugin";

export default {
  input: "src/index.js",
  output: {
    dir: "dist",
    format: "cjs",
  },
  plugins: [optimizeLodashImports()],
};

Options

Configuration can be passed to the plugin as an object with the following keys:

exclude

Type: String | Array[...String]<br> Default: null

A minimatch pattern, or array of patterns, which specifies the files in the build the plugin should ignore. By default no files are ignored.

include

Type: String | Array[...String]<br> Default: null

A minimatch pattern, or array of patterns, which specifies the files in the build the plugin should operate on. By default all files are targeted.

useLodashEs

Type: boolean<br> Default: false

If true, the plugin will rewrite lodash imports to use lodash-es.…

Description from the npm listing.

  • lodash
  • rollup
  • rollup-plugin
  • vite-plugin
  • rolldown
  • optimize
  • minify

README badge

Show your rank in a README or on your website. The badge updates automatically.

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

@optimize-lodash/rollup-plugin weekly downloads on npm, last 90 days: 1,555,888 weekly downloads as of Dec 5, 2026, +109% over 90 days.@optimize-lodash/rollup-pluginWeekly downloads on npm · Last 90 days1,555,888downloads / week+109% over 90 days0200K400K600K800K1M1.2M1.4M1.6MSep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
@optimize-lodash/rollup-plugin weekly downloads on npm, last 90 days: 1,555,888 weekly downloads as of Dec 5, 2026, +109% over 90 days.

7/30/90-day growth

@optimize-lodash/rollup-plugin weekly downloads growth on npm: +32.6% over 7 days, +15.3% over 30 days, +109% over 90 days.@optimize-lodash/rollup-pluginWeekly downloads growth on npm1,555,888downloads / week now7-day growth+382,303 weekly downloads+32.6%30-day growth+206,049 weekly downloads+15.3%90-day growth+810,044 weekly downloads+109%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
@optimize-lodash/rollup-plugin weekly downloads growth on npm: +32.6% over 7 days, +15.3% over 30 days, +109% over 90 days.

Ranking history

@optimize-lodash/rollup-plugin npm ranking history: currently #245 (by weekly downloads).@optimize-lodash/rollup-pluginnpm ranking · by weekly downloads · Last 90 days#245current rank#235#240#245#250#255#260#265#270#275Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 18, 2026 – Dec 6, 2026 · 44 observations · Updated Dec 5, 2026pluginstats.com
@optimize-lodash/rollup-plugin npm ranking history: currently #245 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,084 shown · page 13, #5 (overall #245)
All npm: every listing in weekly downloads order

Listing placement

Vite plugins300 listings · 15 pages · page 2, #10 (overall #30)
Vite plugins: every listing in weekly downloads order

Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.

Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.

Recent observations

Full history (170)
Recent weekly downloads observations for @optimize-lodash/rollup-plugin
Date (UTC)Weekly downloadsChange vs. previous
1,555,888+41.6K
1,514,328+109K
1,405,301+101.6K
1,303,686+46.3K
1,257,396+38.2K
1,219,189+34.1K
1,185,125+11.5K
1,173,585-3.5K
1,177,077-51.5K
1,228,606-82.5K
1,311,100-53.4K
1,364,497-40.1K
1,404,555-34.7K
1,439,263—

Data source

Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.

Listing: https://www.npmjs.com/package/@optimize-lodash/rollup-plugin. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.