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 · Oct 18, 2026

@optimize-lodash/rollup-plugin has 532,943 recorded weekly downloads on npm, a decrease of 27.9% over the past 30 days, ranking #265 of 2,322 tracked listings.

Weekly downloads
532,943
Official API · Oct 18, 2026
7-day growth
-48.9%
-510.8K weekly downloads
30-day growth
-27.9%
-206K weekly downloads
90-day growth
-10.2%
-60.7K weekly downloads
Rank
#265
Among tracked npm listings

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: 532,943 weekly downloads as of Oct 18, 2026, -10.2% over 90 days.@optimize-lodash/rollup-pluginWeekly downloads on npm · Last 90 days532,943downloads / week-10.2% over 90 days400K500K600K700K800K900K1M1.1MJul 20Aug 4Aug 19Sep 3Sep 18Oct 3Oct 18downloads / weekobservedarchived (Internet Archive)no observationsJul 22, 2026 – Oct 18, 2026 · 89 observations · Updated Oc…pluginstats.com
@optimize-lodash/rollup-plugin weekly downloads on npm, last 90 days: 532,943 weekly downloads as of Oct 18, 2026, -10.2% over 90 days.

7/30/90-day growth

@optimize-lodash/rollup-plugin weekly downloads growth on npm: -48.9% over 7 days, -27.9% over 30 days, -10.2% over 90 days.@optimize-lodash/rollup-pluginWeekly downloads growth on npm532,943downloads / week now7-day growth-510,784 weekly downloads-48.9%30-day growth-205,971 weekly downloads-27.9%90-day growth-60,688 weekly downloads-10.2%Growth vs. nearest observation to each baseline date · Updated Oct 18, 2026pluginstats.com
@optimize-lodash/rollup-plugin weekly downloads growth on npm: -48.9% over 7 days, -27.9% over 30 days, -10.2% over 90 days.

Ranking history

@optimize-lodash/rollup-plugin npm ranking history: currently #265 (by weekly downloads).@optimize-lodash/rollup-pluginnpm ranking · by weekly downloads · Last 90 days#265current rank#258#260#262#264#266#268Jul 22Aug 6Aug 21Sep 5Sep 20Oct 5Oct 20rankOct 18, 2026 – Oct 20, 2026 · 3 observations · Updated Oct 18, 2026pluginstats.com
@optimize-lodash/rollup-plugin npm ranking history: currently #265 (by weekly downloads).

Listing placement

All npm2,320 listings · 116 pages · 1,161 shown · page 14, #5 (overall #265)
All npm: every listing in weekly downloads order

Listing placement

Vite plugins253 listings · 13 pages · page 2, #8 (overall #28)
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 (122)
Recent weekly downloads observations for @optimize-lodash/rollup-plugin
Date (UTC)Weekly downloadsChange vs. previous
532,943+48.3K
484,640-105.3K
589,962-12.4K
602,322-239.1K
841,453-222.3K
1,063,7680
1,063,768+20K
1,043,727+26.9K
1,016,842+31.2K
985,678+42.3K
943,331+51.1K
892,214+47.7K
844,543-177.4K
1,021,912—

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 Oct 20, 2026. See the methodology.