
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
vite-plugin-externalize-dependencies
Advanced tools
A simplified plugin for Vite that allows you to exclude specific dependencies from the Vite bundle during development.
A simplified plugin for Vite that allows you to exclude specific dependencies from the Vite bundle during development.
The following errors/warnings are supressed:
To install the plugin, use npm:
npm i vite-plugin-externalize-dependencies --save-dev
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.
The plugin is intended to be consumed by Vite.
Contributions are welcome! If you wish to contribute, you can use the following npm commands to help facilitate your development process:
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.
This plugin is designed to work during development. For production, users should manually configure build.rollupOptions.external in Vite.
If you encounter any problems or have any issues, please open a new issue in the GitHub repository.
This project is licensed under the MIT License.
FAQs
A simplified plugin for Vite that allows you to exclude specific dependencies from the Vite bundle during development.
The npm package vite-plugin-externalize-dependencies receives a total of 4,636 weekly downloads. As such, vite-plugin-externalize-dependencies popularity was classified as popular.
We found that vite-plugin-externalize-dependencies demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.