File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ var NodeEnvironmentPlugin = require("./node/NodeEnvironmentPlugin");
88var WebpackOptionsApply = require ( "./WebpackOptionsApply" ) ;
99var WebpackOptionsDefaulter = require ( "./WebpackOptionsDefaulter" ) ;
1010var validateWebpackOptions = require ( "./validateWebpackOptions" ) ;
11+ var WebpackOptionsValidationError = require ( "./WebpackOptionsValidationError" ) ;
1112
1213function webpack ( options , callback ) {
1314 var compiler ;
@@ -18,9 +19,7 @@ function webpack(options, callback) {
1819 } else if ( typeof options === "object" ) {
1920 var webpackOptionsValidationErrors = validateWebpackOptions ( options ) ;
2021 if ( webpackOptionsValidationErrors . length ) {
21- var validationError = new Error ( "Passed 'options' object does not look like a valid webpack configuration" ) ;
22- validationError . validationErrors = webpackOptionsValidationErrors ;
23- throw validationError ;
22+ throw new WebpackOptionsValidationError ( webpackOptionsValidationErrors ) ;
2423 }
2524 new WebpackOptionsDefaulter ( ) . process ( options ) ;
2625
You can’t perform that action at this time.
0 commit comments