old_contents: /*
  	MIT License http://www.opensource.org/licenses/mit-license.php
  	Author Tobias Koppers @sokra
  */
  var Compiler = require("./Compiler");
  var MultiCompiler = require("./MultiCompiler");
  var NodeEnvironmentPlugin = require("./node/NodeEnvironmentPlugin");
  var WebpackOptionsApply = require("./WebpackOptionsApply");
  var WebpackOptionsDefaulter = require("./WebpackOptionsDefaulter");
  
  function webpack(options, callback) {
  	var compiler;
  	if(Array.isArray(options)) {
  		compiler = new MultiCompiler(options.map(function(options) {
  			return webpack(options);
  		}));
  	} else {
  		new WebpackOptionsDefaulter().process(options);
  
  		compiler = new Compiler();
  		compiler.options = options;
  		compiler.options = new WebpackOptionsApply().process(options, compiler);
  		new NodeEnvironmentPlugin().apply(compiler);
  		compiler.applyPlugins("environment");
  		compiler.applyPlugins("after-environment");
  	}
  	if(callback) {
  		if(options.watch) {
  			return compiler.watch(options.watchDelay, callback);
  		} else {
  			compiler.run(callback);
  		}
  	}
  	return compiler;
  }
  exports = module.exports = webpack;
  
  webpack.WebpackOptionsDefaulter = WebpackOptionsDefaulter;
  webpack.WebpackOptionsApply = WebpackOptionsApply;
  webpack.Compiler = Compiler;
  webpack.MultiCompiler = MultiCompiler;
  webpack.NodeEnvironmentPlugin = NodeEnvironmentPlugin;
  
  function exportPlugins(exports, path, plugins) {
  	plugins.forEach(function(name) {
  		Object.defineProperty(exports, name, {
  			configurable: false,
  			enumerable: true,
  			get: function() {
  				return require(path + "/" + name);
  			}
  		});
  	});
  }
  
  exportPlugins(exports, ".", [
  	"DefinePlugin",
  	"NormalModuleReplacementPlugin",
  	"ContextReplacementPlugin",
  	"IgnorePlugin",
  	"BannerPlugin",
  	"PrefetchPlugin",
  	"ProvidePlugin",
  	"HotModuleReplacementPlugin",
  	"ResolverPlugin",
  	"SourceMapDevToolPlugin",
  	"EvalDevToolModulePlugin",
  	"CachePlugin",
  	"ExtendedAPIPlugin",
  	"ExternalsPlugin",
  	"JsonpTemplatePlugin",
  	"LibraryTemplatePlugin",
  	"LoaderTargetPlugin",
  	"MemoryOutputFileSystem",
  	"ProgressPlugin",
  	"SetVarMainTemplatePlugin",
  	"UmdMainTemplatePlugin",
  	"NoErrorsPlugin",
  	"NewWatchingPlugin",
  	"OldWatchingPlugin",
  	"EnvironmentPlugin"
  ]);
  exportPlugins(exports.optimize = {}, "./optimize", [
  	"AggressiveMergingPlugin",
  	"CommonsChunkPlugin",
  	"DedupePlugin",
  	"LimitChunkCountPlugin",
  	"MinChunkSizePlugin",
  	"OccurenceOrderPlugin",
  	"OccurrenceOrderPlugin",
  	"UglifyJsPlugin"
  ]);
  exportPlugins(exports.dependencies = {}, "./dependencies", [
  	"LabeledModulesPlugin"
  ]);
  
new_contents: /*
  	MIT License http://www.opensource.org/licenses/mit-license.php
  	Author Tobias Koppers @sokra
  */
  var Compiler = require("./Compiler");
  var MultiCompiler = require("./MultiCompiler");
  var NodeEnvironmentPlugin = require("./node/NodeEnvironmentPlugin");
  var WebpackOptionsApply = require("./WebpackOptionsApply");
  var WebpackOptionsDefaulter = require("./WebpackOptionsDefaulter");
  
  function webpack(options, callback) {
  	var compiler;
  	if(Array.isArray(options)) {
  		compiler = new MultiCompiler(options.map(function(options) {
  			return webpack(options);
  		}));
  	} else if(typeof options === "object") {
  		new WebpackOptionsDefaulter().process(options);
  
  		compiler = new Compiler();
  		compiler.options = options;
  		compiler.options = new WebpackOptionsApply().process(options, compiler);
  		new NodeEnvironmentPlugin().apply(compiler);
  		compiler.applyPlugins("environment");
  		compiler.applyPlugins("after-environment");
  	} else {
  		throw new Error("Invalid argument: options");
  	}
  	if(callback) {
  		if(typeof callback !== "function") throw new Error("Invalid argument: callback");
  		var watchOptions = options.watch || !Array.isArray(options) ? options : options[0];
  		if(watchOptions.watch) {
  			return compiler.watch(watchOptions.watchDelay, callback);
  		} else {
  			compiler.run(callback);
  		}
  	}
  	return compiler;
  }
  exports = module.exports = webpack;
  
  webpack.WebpackOptionsDefaulter = WebpackOptionsDefaulter;
  webpack.WebpackOptionsApply = WebpackOptionsApply;
  webpack.Compiler = Compiler;
  webpack.MultiCompiler = MultiCompiler;
  webpack.NodeEnvironmentPlugin = NodeEnvironmentPlugin;
  
  function exportPlugins(exports, path, plugins) {
  	plugins.forEach(function(name) {
  		Object.defineProperty(exports, name, {
  			configurable: false,
  			enumerable: true,
  			get: function() {
  				return require(path + "/" + name);
  			}
  		});
  	});
  }
  
  exportPlugins(exports, ".", [
  	"DefinePlugin",
  	"NormalModuleReplacementPlugin",
  	"ContextReplacementPlugin",
  	"IgnorePlugin",
  	"BannerPlugin",
  	"PrefetchPlugin",
  	"ProvidePlugin",
  	"HotModuleReplacementPlugin",
  	"ResolverPlugin",
  	"SourceMapDevToolPlugin",
  	"EvalDevToolModulePlugin",
  	"CachePlugin",
  	"ExtendedAPIPlugin",
  	"ExternalsPlugin",
  	"JsonpTemplatePlugin",
  	"LibraryTemplatePlugin",
  	"LoaderTargetPlugin",
  	"MemoryOutputFileSystem",
  	"ProgressPlugin",
  	"SetVarMainTemplatePlugin",
  	"UmdMainTemplatePlugin",
  	"NoErrorsPlugin",
  	"NewWatchingPlugin",
  	"OldWatchingPlugin",
  	"EnvironmentPlugin"
  ]);
  exportPlugins(exports.optimize = {}, "./optimize", [
  	"AggressiveMergingPlugin",
  	"CommonsChunkPlugin",
  	"DedupePlugin",
  	"LimitChunkCountPlugin",
  	"MinChunkSizePlugin",
  	"OccurenceOrderPlugin",
  	"OccurrenceOrderPlugin",
  	"UglifyJsPlugin"
  ]);
  exportPlugins(exports.dependencies = {}, "./dependencies", [
  	"LabeledModulesPlugin"
  ]);
  
subject: Check arguments to webpack function, use watch from options