vite-plugin-externalize-dependencies weekly downloads statistics
By MilanKovacic · npm · Vite plugins
A simplified plugin for Vite that allows you to exclude specific dependencies from the Vite bundle during development.
vite-plugin-externalize-dependencies has 9,591 recorded weekly downloads on npm, a decrease of 2.7% over the past 30 days, ranking #1282 of 3,247 tracked listings.
About vite-plugin-externalize-dependencies
Vite Plugin Externalize Dependencies 
A simplified plugin for Vite that allows you to exclude specific dependencies from the Vite bundle during development.
The following errors/warnings are supressed:
- The entry point [moduleName] cannot be marked as external
- Do not know how to load path: [namespace:moduleName]
- Failed to resolve import [dependency] from [sourceFile]. Does the file exist?
- The following dependencies are imported but could not be resolved: [dependency] (imported by [sourceFile])
Table of Contents
- Installation
- Usage
- Requirements
- Contributing and Development
- Known Issues & limitations
- Support
- License
Installation
To install the plugin, use npm:
npm i vite-plugin-externalize-dependencies --save-dev
Usage
After installing the plugin, import it, and add it to Vite configuration:
import { defineConfig } from "vite";
import externalize from "vite-plugin-externalize-dependencies";
export default defineConfig({
plugins: [
externalize({
externals: [
"react", // Externalize "react", and all of its subexports (react/*), such as react/jsx-runtime
/^external-.*/, // Externalize all modules starting with "external-"
(moduleName) => moduleName.includes("external"), // Externalize all modules containing "external",
],
}),
],
});
Modules can be externalized by name (exact match), by regex, or by a custom function (returning true to externalize the module). The plugin will automatically externalize all subexports of a module, such as react/jsx-runtime.
Requirements
The plugin is intended to be consumed by Vite.
Contributing and Development
Contributions are welcome! If you wish to contribute, you can use the following npm commands to help facilitate your development process:
- dev: Serve index.html for development testing.
- build: Build the plugin.
- test: Run tests to verify expected outputs.
Use them as follows:
npm run dev
npm run build
npm run test
Please feel free to open a pull request with your changes or improvements.
Known Issues & limitations
This plugin is designed to work during development. For production, users should manually configure build.rollupOptions.external in Vite.
Support
If you encounter any problems or have any issues, please open a new issue in the GitHub repository.
License
This project is licensed under the MIT License.
Description from the npm listing.
- vite
- vite-plugin
- externalize-dependencies
- bundle-exclusion
- import-maps
- webpack-externals
- rollup-externals
- dependency-management
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
7/30/90-day growth
Ranking history
Listing placement
Listing placement
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)Similar npm Vite plugins plugins
All 20 vite-plugin-externalize-dependencies alternativesData 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-externalize-dependencies. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.