
Security News
pnpm 10.12 Introduces Global Virtual Store and Expanded Version Catalogs
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.
webpack-externals-plugin
Advanced tools
Supply Chain Security
Vulnerability
Quality
Maintenance
License
Provides more powerful externals configuration options.
new ExternalsPlugin({ type, test, include, exclude })
, where:
type
represents the type of external (/var|this|commonjs2?|amd|umd/
). Defaults to options.output.libraryTarget
.test
, include
, exclude
work as they do with loader configuration.The following webpack configuration considers all modules under the local node_modules/
directory as externals.
webpack.config.js
:
var ExternalsPlugin = require('webpack-externals-plugin');
module.exports = {
entry: './app.js',
output: {
path: __dirname + '/dist',
filename: 'bundle.js',
},
plugins: [
new ExternalsPlugin({
type: 'commonjs',
include: __dirname + '/node_modules',
}),
],
};
options.externals
Webpack externals are only filtered depending on the user request (require('webpack')
=> webpack
).
With this plugin, externals are filtered depending on the path of the resolved module (require('webpack')
=> <dir_path>/node_modules/webpack/lib/webpack.js
).
This lets you include or exclude entire directories depending on the actual path of the resolved module.
FAQs
Provides more powerful externals configuration options
The npm package webpack-externals-plugin receives a total of 198 weekly downloads. As such, webpack-externals-plugin popularity was classified as not popular.
We found that webpack-externals-plugin 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
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.
Security News
Amaro 1.0 lays the groundwork for stable TypeScript support in Node.js, bringing official .ts loading closer to reality.
Research
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.