# webpack-node-externals

> Exclude node_modules from webpack bundles for the backend

Source: https://talira.ai/catalog/webpack-node-externals-qj9fz0rw
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Plugin
- Categories: [developer tools / build / bundlers](https://talira.ai/categories/developer-tools/build/bundlers), [languages / javascript](https://talira.ai/categories/languages/javascript)
- Licence: MIT[^1]
- Pricing: Free and open source[^1]
- Free tier: yes[^1]
- Backed by: [Liad Yosef](https://talira.ai/orgs/liady.md)

webpack-node-externals creates a [webpack](https://talira.ai/catalog/webpack-9pcx44tb.md) externals function that leaves `node_modules` dependencies out of the bundle, which is what you usually want when bundling a Node.js backend with webpack. It reads the dependencies from the node_modules folder (or package.json), with an allowlist for modules you do want bundled and options for module path and import type.

## Links

- GitHub: https://github.com/liady/webpack-node-externals

## Problems it solves

- bundle a Node.js server with webpack without including node_modules
- keep dependencies external in a webpack backend build
- shrink a webpack server bundle

## Features

- excludes node_modules from webpack bundles
- allowlist for modules to bundle
- configurable module directory and import type

## Trust

Overall: 0.33 out of 1.
Signals: maintenance 0.27, adoption 0.62, momentum 0.31, community 0.38, backing 0.30, extensibility 0.00.

- latest release v3.0.0 5.6 years ago
- 1.3k GitHub stars
- 8 contributors
- accepts sponsorship (Github)
- backed by Liad Yosef

Warnings:

- last commit 9 months ago

## Related

- Works with [webpack](https://talira.ai/catalog/webpack-9pcx44tb.md)

## Alternatives

- [esbuild](https://talira.ai/catalog/esbuild-198nyf0k.md): An extremely fast bundler for the web
- [webpack](https://talira.ai/catalog/webpack-9pcx44tb.md): A bundler for javascript and friends
- [Parcel](https://talira.ai/catalog/parcel-2zm6hky3.md): The zero configuration build tool for the web
- [Webpack Bundle Analyzer](https://talira.ai/catalog/webpack-bundle-analyzer-1vabzy4f.md): A webpack plugin and CLI that shows what's in your bundles as an interactive, zoomable treemap
- [Browserify](https://talira.ai/catalog/browserify-zt2h0rks.md): Use Node-style require() in the browser by bundling your dependencies
- [Vite](https://talira.ai/catalog/vite-2kbqmjmm.md): Next Generation Frontend Tooling

## Sources

[^1]: https://github.com/liady/webpack-node-externals/blob/master/LICENSE (checked 29 Nov 2026)
