Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

webpack-node-externals

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webpack-node-externals - npm Package Compare versions

Comparing version 2.4.0 to 2.5.0

16

index.js

@@ -29,2 +29,7 @@ var utils = require('./utils');

mistakes.forEach(function (mistake) {
utils.error(
mistakes.map(function (mistake) {
return mistake.message;
})
);
utils.log(mistake.message);

@@ -57,3 +62,12 @@ });

// return an externals function
return function (context, request, callback) {
return function (arg1, arg2, arg3) {
var context = arg1;
var request = arg2;
var callback = arg3;
// in case of webpack 5
if (arg1 && arg1.context && arg1.request) {
context = arg1.context;
request = arg1.request;
callback = arg2;
}
var moduleName = getModuleName(request, includeAbsolutePaths);

@@ -60,0 +74,0 @@ if (

2

package.json
{
"name": "webpack-node-externals",
"version": "2.4.0",
"version": "2.5.0",
"description": "Easily exclude node_modules in Webpack bundle",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -105,5 +105,5 @@ var fs = require('fs');

importType: ['import', 'importype', 'importtype'],
modulesDir: ['moduleDir', 'moduledir', 'moduledirs'],
modulesDir: ['moduledir', 'moduledirs'],
modulesFromFile: ['modulesfile'],
includeAbsolutePaths: ['includeAbsolutePaths'],
includeAbsolutePaths: ['includeAbsolutesPaths'],
additionalModuleDirs: ['additionalModulesDirs', 'additionalModulesDir'],

@@ -134,4 +134,14 @@ };

exports.log = function(message) {
console.log(`[webpack-node-externals] : ${message}`)
}
exports.log = function (message) {
console.log(`[webpack-node-externals] : ${message}`);
};
exports.error = function (errors) {
throw new Error(
errors
.map(function (error) {
return `[webpack-node-externals] : ${error}`;
})
.join('\r\n')
);
};
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc