Skip to content
PluginStats

vite-plugin-lucide-preprocess weekly downloads statistics

By WarningImHack3r · npm · Vite plugins

A Vite plugin to tree-shake your Lucide icons.

View on npm Fresh · Oct 18, 2026

vite-plugin-lucide-preprocess has 3,874 recorded weekly downloads on npm, a decrease of 37.0% over the past 30 days, ranking #1201 of 2,322 tracked listings.

Weekly downloads
3,874
Official API · Oct 18, 2026
7-day growth
-43.6%
-3K weekly downloads
30-day growth
-37.0%
-2.3K weekly downloads
90-day growth
-64.4%
-7K weekly downloads
Rank
#1201
Among tracked npm listings

About vite-plugin-lucide-preprocess

vite-plugin-lucide-preprocess

NPM Version NPM Downloads NPM Type Definitions NPM License

A Vite plugin to tree-shake your Lucide icons.

What is this?

If you want to import Lucide icons in your project, you can (usually — depending on the package) use two methods:

import { IconName } from "@lucide/svelte";
// or
import IconName from "@lucide/svelte/icons/icon-name";

While the first method is more convenient (and may be the one used by auto-import features in your editor), it is not tree-shakable.
In fact, a single import from "lucide-<framework>" or "@lucide/<framework>" will import all icons; not ideal for Vite dev server performance and build time.

This plugin will replace the first method with the second one, so you can keep the convenience of the first method while benefiting from tree-shaking optimizations. “Correct” imports will be kept as-is.

[!NOTE] The plugin is primarily intended for @lucide/svelte, but it works with any Lucide package using Vite. If it doesn't support a Lucide implementation, please open an issue.

Credits and opinion

I got the idea from Phosphor Icons' optimizer. However, this plugin is written from scratch and is not based on the Phosphor one, even though the technique is essentially the same.

Contrary to the experimental version of Phosphor Icons' implementation, this plugin is a Vite plugin and not a Svelte one, it is more generic and can be used with any framework. Additionally, it doesn't suffer from the limitations of the Svelte plugin, preventing the old Phosphor optimizer from working without disabling the native Vite optimizations of phosphor-svelte.

This should subjectively be a feature embedded in Lucide itself (@lucide/svelte/preprocessor), but I don't know if it will ever be implemented. I opened an issue on the lucide-icons repository to discuss this.

Auto-updater

As of version 1.1.0, the plugin includes an auto-updater. It helps support the renamed and deprecated icons by automatically updating the plugin when necessary.

If you use a recently deprecated icon and can't make your build work, please wait for a few hours for the plugin to update itself. If the problem persists, please open an issue in this repository.

More information about the auto-updater can be found in WarningImHack3r/vite-plugin-lucide-preprocess#6.

Installation

Install the plugin with your package manager of choice:

pnpm i vite-plugin-lucide-preprocess

Then, add it to your vite.config.js/.ts:

import { defineConfig } from "vite";
import lucidePreprocess from "vite-plugin-lucide-preprocess";

export default defineConfig({
	plugins: [lucidePreprocess() /* , ... */]
});

[!WARNING] Make sure to add the plugin before any other preprocessors in the plugins array.

Options

The plugin optionally accepts an object with the following options:

  • importMode (default: "esm"): The import mode for CommonJS-compatible frameworks.

    • "esm": Import the icons as ES modules.
    • "cjs": Import the icons as CommonJS modules.

    This option is useful if you use a CommonJS-compatible framework like React or Vue. It will automatically replace the imports with the correct syntax depending on whether your framework supports CJS or not.

License

MIT

Description from the npm listing.

  • vite
  • vite-plugin
  • lucide
  • tree-shaking
  • treeshaking
  • tree-shake
  • treeshake
  • imports
  • preprocessor

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

vite-plugin-lucide-preprocess weekly downloads on npm, last 90 days: 3,874 weekly downloads as of Oct 18, 2026, -64.4% over 90 days.vite-plugin-lucide-preprocessWeekly downloads on npm · Last 90 days3,874downloads / week-64.4% over 90 days02K4K6K8K10K12K14K16KJul 20Aug 4Aug 19Sep 3Sep 18Oct 3Oct 18downloads / weekobservedarchived (Internet Archive)no observationsJul 22, 2026 – Oct 18, 2026 · 89 observations · Updated Oc…pluginstats.com
vite-plugin-lucide-preprocess weekly downloads on npm, last 90 days: 3,874 weekly downloads as of Oct 18, 2026, -64.4% over 90 days.

7/30/90-day growth

vite-plugin-lucide-preprocess weekly downloads growth on npm: -43.6% over 7 days, -37.0% over 30 days, -64.4% over 90 days.vite-plugin-lucide-preprocessWeekly downloads growth on npm3,874downloads / week now7-day growth-2,999 weekly downloads-43.6%30-day growth-2,275 weekly downloads-37.0%90-day growth-6,995 weekly downloads-64.4%Growth vs. nearest observation to each baseline date · Updated Oct 18, 2026pluginstats.com
vite-plugin-lucide-preprocess weekly downloads growth on npm: -43.6% over 7 days, -37.0% over 30 days, -64.4% over 90 days.

Ranking history

vite-plugin-lucide-preprocess npm ranking history: currently #1201 (by weekly downloads).vite-plugin-lucide-preprocessnpm ranking · by weekly downloads · Last 90 days#1201current rank#1190#1192#1194#1196#1198#1200#1202#1204Jul 22Aug 6Aug 21Sep 5Sep 20Oct 5Oct 20rankOct 18, 2026 – Oct 20, 2026 · 3 observations · Updated Oct 18, 2026pluginstats.com
vite-plugin-lucide-preprocess npm ranking history: currently #1201 (by weekly downloads).

Listing placement

All npm2,320 listings · 116 pages · 1,162 shown · page 61, #4 (overall #1,204)
All npm: every listing in weekly downloads order

Listing placement

Vite plugins253 listings · 13 pages · page 11, #20 (overall #220)
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 vite-plugin-lucide-preprocess
Date (UTC)Weekly downloadsChange vs. previous
3,874+686
3,188-843
4,031-428
4,459-1.7K
6,162-2K
8,1660
8,166+1.3K
6,873+229
6,644+92
6,552-16
6,568-312
6,880-372
7,252-1.4K
8,675—

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/vite-plugin-lucide-preprocess. First seen Oct 16, 2026; last successful collection Oct 20, 2026. See the methodology.