From 3b3f6cb0b365935c365ec04b983c1d1711fe78ff Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Tue, 11 Feb 2014 08:53:32 +0100 Subject: [PATCH] some fixes --- lib/SetVarMainTemplateDecorator.js | 3 ++- lib/WebpackOptionsApply.js | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/SetVarMainTemplateDecorator.js b/lib/SetVarMainTemplateDecorator.js index 6f910dbe5..420b6381e 100644 --- a/lib/SetVarMainTemplateDecorator.js +++ b/lib/SetVarMainTemplateDecorator.js @@ -22,6 +22,7 @@ SetVarMainTemplateDecorator.prototype.render = function(hash, chunk, moduleTempl }; SetVarMainTemplateDecorator.prototype.updateHash = function(hash) { hash.update("set var"); - hash.update(this.varExpression); + hash.update(this.varExpression + ""); + hash.update(this.copyObject + ""); this.mainTemplate.updateHash(hash); }; \ No newline at end of file diff --git a/lib/WebpackOptionsApply.js b/lib/WebpackOptionsApply.js index 0b6dd7992..adbc27281 100644 --- a/lib/WebpackOptionsApply.js +++ b/lib/WebpackOptionsApply.js @@ -90,6 +90,8 @@ WebpackOptionsApply.prototype.process = function(options, compiler) { new NodeTargetPlugin() ); break; + default: + throw new Error("Unsupported target '" + options.target + "'."); } if(options.output.library || options.output.libraryTarget != "var") { var LibraryTemplatePlugin = require("./LibraryTemplatePlugin");