@@ -102,9 +102,9 @@ exports.validateOptions = function (options) {
102102 var mistakes = {
103103 allowlist : [ 'allowslist' , 'whitelist' , 'allow' ] ,
104104 importType : [ 'import' , 'importype' , 'importtype' ] ,
105- modulesDir : [ 'moduleDir' , ' moduledir', 'moduledirs' ] ,
105+ modulesDir : [ 'moduledir' , 'moduledirs' ] ,
106106 modulesFromFile : [ 'modulesfile' ] ,
107- includeAbsolutePaths : [ 'includeAbsolutePaths ' ] ,
107+ includeAbsolutePaths : [ 'includeAbsolutesPaths ' ] ,
108108 additionalModuleDirs : [ 'additionalModulesDirs' , 'additionalModulesDir' ] ,
109109 } ;
110110 var optionsKeys = Object . keys ( options ) ;
@@ -130,6 +130,16 @@ exports.validateOptions = function (options) {
130130 return results ;
131131} ;
132132
133- exports . log = function ( message ) {
134- console . log ( `[webpack-node-externals] : ${ message } ` )
135- }
133+ exports . log = function ( message ) {
134+ console . log ( `[webpack-node-externals] : ${ message } ` ) ;
135+ } ;
136+
137+ exports . error = function ( errors ) {
138+ throw new Error (
139+ errors
140+ . map ( function ( error ) {
141+ return `[webpack-node-externals] : ${ error } ` ;
142+ } )
143+ . join ( '\r\n' )
144+ ) ;
145+ } ;
0 commit comments