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 · Dec 6, 2026

vite-plugin-lucide-preprocess has 9,912 recorded weekly downloads on npm, an increase of 3.3% over the past 30 days, ranking #1264 of 3,247 tracked listings.

Weekly downloads
9,912
Official API · Dec 5, 2026
7-day growth
+14.1%
+1.2K weekly downloads
30-day growth
+3.3%
+321 weekly downloads
90-day growth
+56.0%
+3.6K weekly downloads
Rank
#1264
▲ 34 in 7 days

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, namely @lucide/astro, @lucide/solid, @lucide/svelte, lucide-react, lucide-solid, and lucide-svelte. If it doesn't support a Lucide implementation you believe should be supported (e.g.: supports individual icon import), 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: 9,912 weekly downloads as of Dec 5, 2026, +56.0% over 90 days.vite-plugin-lucide-preprocessWeekly downloads on npm · Last 90 days9,912downloads / week+56.0% over 90 days02K4K6K8K10K12KSep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
vite-plugin-lucide-preprocess weekly downloads on npm, last 90 days: 9,912 weekly downloads as of Dec 5, 2026, +56.0% over 90 days.

7/30/90-day growth

vite-plugin-lucide-preprocess weekly downloads growth on npm: +14.1% over 7 days, +3.3% over 30 days, +56.0% over 90 days.vite-plugin-lucide-preprocessWeekly downloads growth on npm9,912downloads / week now7-day growth+1,227 weekly downloads+14.1%30-day growth+321 weekly downloads+3.3%90-day growth+3,560 weekly downloads+56.0%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
vite-plugin-lucide-preprocess weekly downloads growth on npm: +14.1% over 7 days, +3.3% over 30 days, +56.0% over 90 days.

Ranking history

vite-plugin-lucide-preprocess npm ranking history: currently #1264 (by weekly downloads).vite-plugin-lucide-preprocessnpm ranking · by weekly downloads · Last 90 days#1264current rank#1100#1150#1200#1250#1300#1350Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 18, 2026 – Dec 6, 2026 · 44 observations · Updated Dec 5, 2026pluginstats.com
vite-plugin-lucide-preprocess npm ranking history: currently #1264 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,083 shown · page 64, #4 (overall #1,264)
All npm: every listing in weekly downloads order

Listing placement

Vite plugins300 listings · 15 pages · page 12, #9 (overall #229)
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 vite-plugin-lucide-preprocess
Date (UTC)Weekly downloadsChange vs. previous
9,912-176
10,088+19
10,069+240
9,829+841
8,988+409
8,579-102
8,681-4
8,685+80
8,605+61
8,544-545
9,089-748
9,837-395
10,232-184
10,416—

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 Dec 6, 2026. See the methodology.