some fixes

This commit is contained in:
Tobias Koppers 2014-02-11 08:53:32 +01:00
parent 5f856ec3b3
commit 3b3f6cb0b3
2 changed files with 4 additions and 1 deletions

View File

@ -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);
};

View File

@ -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");