Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Generated on Apr 20, 2024 via pnpm

webpack-node-externals 3.0.0

Easily exclude node_modules in Webpack bundle
Package summary
Share
0
issues
1
license
1
MIT
Package created
27 Jan 2016
Version published
21 Apr 2021
Maintainers
1
Total deps
1
Direct deps
0
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
webpack-node-externals@3.0.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of webpack-node-externals 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does webpack-node-externals do?

Webpack-node-externals is a useful tool for excluding node_modules in Webpack bundle. The node modules won't be bundled but will be kept as require('module'), thus avoiding unnecessary bloat in your library and enabling better dependency management.

How do you use webpack-node-externals?

To use webpack-node-externals, firstly you need to install it via npm as a dev dependency. Here is how you do it:

npm install webpack-node-externals --save-dev

Then, in your webpack.config.js, you need to require the package and use it as a function in the externals configuration. For Webpack 4 and earlier, it would look like this:

var nodeExternals = require('webpack-node-externals');

module.exports = {
    target: 'node', 
    externals: [nodeExternals()], 
   ...
};

For Webpack 5, the configuration slightly changes:

var nodeExternals = require('webpack-node-externals');

module.exports = {
    externalsPresets: { node: true },
    externals: [nodeExternals()],
    ...
};

Where are the webpack-node-externals docs?

The primary documentation for webpack-node-externals can be found in the README file on the GitHub repository at https://github.com/liady/webpack-node-externals. It provides a detailed overview of the package, including descriptions and usage examples, and explains the different configuration options available to you.