Skip to content
PluginStats

vite-plugin-entry-shaking weekly downloads statistics

By Dschungelabenteuer (2 listings) · npm · Vite plugins

Mimic tree-shaking behaviour when importing code from an entry file in development mode.

View on npm Stale · Dec 4, 2026

vite-plugin-entry-shaking has 6,055 recorded weekly downloads on npm, a decrease of 4.3% over the past 30 days, ranking #1458 of 3,247 tracked listings.

Weekly downloads
6,055
Official API · Dec 5, 2026
7-day growth
-1.8%
-111 weekly downloads
30-day growth
-4.3%
-273 weekly downloads
90-day growth
+23.2%
+1.1K weekly downloads
Rank
#1458
▼ 33 in 7 days

About vite-plugin-entry-shaking

<p align="center"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://github.com/Dschungelabenteuer/vite-plugin-entry-shaking/assets/16818271/85f20faf-0e76-4339-a703-0f4ef1252de9"> <img src="https://github.com/Dschungelabenteuer/vite-plugin-entry-shaking/assets/16818271/6af66867-ffea-4f7d-9f56-3801ffd17659" alt="Vite-plugin-entry-shaking illustration" width="600" /> </picture> </p> <h1 align="center">vite-plugin-entry-shaking</h1> <p align="center"> Mimic tree-shaking behaviour when importing code from an entry file in development mode. </p>

[!NOTE] The main execution logic of this plugin only applies to development mode because it addresses an issue which is specific to development mode. It may be used in test environments that rely on Vite (e.g. Vitest) but should be used with caution as stated in limitations.

Install

Open in Codeflow

# Using npm
npm i -D vite vite-plugin-entry-shaking
# Using Yarn
yarn add -D vite vite-plugin-entry-shaking
# Using pnpm
pnpm add -D vite vite-plugin-entry-shaking

Usage

Setup the plugin in your Vite configuration file.

import { resolve } from 'path';
import { defineConfig } from 'vite';
import EntryShakingPlugin from 'vite-plugin-entry-shaking';

export default defineConfig({
  plugins: [
    EntryShakingPlugin({
      targets: [
        // Using direct paths.
        resolve(__dirname, 'src/entry-a'),
        // Or using glob patterns.
        {
          glob: 'src/utils/*.ts',
          globOptions: { ignore: ['excluded.ts'] },
        }
      ],
    }),
  ],
});
Plugin options
<table> <thead> <tr> <th>Option name</th> <th>Type</th> <th>Default</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td>targets <em>(required)</em></td> <td> <ul> <li><code>string[]</code></li> <li><code>{ path: string }[]</code></li> <li><code>{ glob: string; globOptions: import('fast-glob').Options }[]</code></li> </ul> </td> <td>N/A</td> <td>You need to list all of the entry points you want this plugin to process.</td> </tr> <tr> <td>extensions</td> <td><code>string[]</code></td> <td><code>['js', 'jsx', 'mjs', 'ts', 'tsx', 'mts']</code></td> <td>This specifies which file extensions you want this plugin to process.</td> </tr> <tr> <td>ignorePatterns</td> <td><code>(string | RegExp)[]</code></td> <td><code>[/node_modules/]</code></td> <td>This specifies RegExp/string whose matched paths must be ignored by the plugin.</td> </tr> <tr> <td>maxWildcardDepth</td> <td><code>number</code></td> <td><code>0</code></td> <td>How deep should this plugin run static analysis when encountering wildcards?</td> </tr> <tr> <td>diagnostics</td> <td><code>boolean | DiagnosticsConfig</code></td> <td><code>true</code></td> <td>Toggles all diagnostics when set as a boolean, or specific diagnostics when set as an object.</td> </tr> <tr> <td>debug</td> <td><code>boolean</code></td> <td><code>false</code></td> <td>Toggles debug mode. This will print debug logs if Vite's <code>logLevel</code> is set to any other value than <code>'silent'</code></td> </tr> </tbody> </table>
Diagnostics configuration

Diagnostics are recommendations/warnings emitted by the plugin as it analyzes the specified entry files. They aim to help you improve the plugin's efficiency by suggesting changes and provide explanation on why they were emitted. See RESOURCES for a more in-depth insight about possible diagnostics.

<table> <thead> <tr> <th>Name</th> <th>Default</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td>definedWithinEntry</td> <td><code>true</code></td> <td>Emit warning if an entry file defines code that may prevent tree-shaking.</td> </tr> <tr> <td>maxDepthReached</td> <td><code>true</code></td> <td>Emits a warning when max analysis depth was reached when handling wildcard imports.</td> </tr> </tbody> </table>

Examples

Examples illustrating usage and benefits can be found here. Feel free to fork and play around. For instance, you can toggle the plugin on and off their respective vite config file while serving in development mode and see how it affects the amount of requests made by your browser.

This repository provides a simple CLI to help you quickly scaffold a new example, simply run the following command from the project's root to get started:

pnpm generate-example

Debugger (experimental)

Version 0.4.0 introduces a debugger as an optional dependency. When installed and attached to the plugin, a debugger application will open alongside your actual application in dev mode. This can help you get an overall idea of what the plugin is processing and its impacts on performances.

debugger preview

[!NOTE] This requires installing vite-plugin-entry-shaking-debugger and setting the debug option to true.

Motivation…

Description from the npm listing.

  • vite
  • vite-plugin
  • entry
  • tree shaking

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-entry-shaking weekly downloads on npm, last 90 days: 6,055 weekly downloads as of Dec 5, 2026, +23.2% over 90 days.vite-plugin-entry-shakingWeekly downloads on npm · Last 90 days6,055downloads / week+23.2% over 90 days02K4K6K8K10KSep 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-entry-shaking weekly downloads on npm, last 90 days: 6,055 weekly downloads as of Dec 5, 2026, +23.2% over 90 days.

7/30/90-day growth

vite-plugin-entry-shaking weekly downloads growth on npm: -1.8% over 7 days, -4.3% over 30 days, +23.2% over 90 days.vite-plugin-entry-shakingWeekly downloads growth on npm6,055downloads / week now7-day growth-111 weekly downloads-1.8%30-day growth-273 weekly downloads-4.3%90-day growth+1,142 weekly downloads+23.2%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
vite-plugin-entry-shaking weekly downloads growth on npm: -1.8% over 7 days, -4.3% over 30 days, +23.2% over 90 days.

Ranking history

vite-plugin-entry-shaking npm ranking history: currently #1458 (by weekly downloads).vite-plugin-entry-shakingnpm ranking · by weekly downloads · Last 90 days#1458current rank#1150#1200#1250#1300#1350#1400#1450#1500Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 18, 2026 – Dec 6, 2026 · 29 observations · Updated Dec 5, 2026pluginstats.com
vite-plugin-entry-shaking npm ranking history: currently #1458 (by weekly downloads).

Listing placement

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

Listing placement

Vite plugins300 listings · 15 pages · page 14, #2 (overall #262)
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-entry-shaking
Date (UTC)Weekly downloadsChange vs. previous
6,055-31
6,086+310
5,776-368
6,144+156
5,988-146
6,134-57
6,191+25
6,166-66
6,232-797
7,029+158
6,871-173
7,044-212
7,256-471
7,727—

Similar npm Vite plugins plugins

All 20 vite-plugin-entry-shaking alternatives

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-entry-shaking. First seen Oct 16, 2026; last successful collection Dec 4, 2026. See the methodology.