mirror of https://github.com/webpack/webpack.git
Added tests and fixed spelling error causing initial tests to fail
This commit is contained in:
parent
164e33bd86
commit
86c5947904
|
|
@ -22,11 +22,11 @@ function accessorAccess(base, accessor, joinWith) {
|
|||
}).join(joinWith || "; ");
|
||||
}
|
||||
|
||||
function LibraryTemplatePlugin(name, target, umdNamedDefine, auxilaryComment) {
|
||||
function LibraryTemplatePlugin(name, target, umdNamedDefine, auxiliaryComment) {
|
||||
this.name = name;
|
||||
this.target = target;
|
||||
this.umdNamedDefine = umdNamedDefine;
|
||||
this.auxilaryComment = auxilaryComment;
|
||||
this.auxiliaryComment = auxiliaryComment;
|
||||
}
|
||||
module.exports = LibraryTemplatePlugin;
|
||||
LibraryTemplatePlugin.prototype.apply = function(compiler) {
|
||||
|
|
@ -65,7 +65,7 @@ LibraryTemplatePlugin.prototype.apply = function(compiler) {
|
|||
compilation.apply(new UmdMainTemplatePlugin(this.name, {
|
||||
optionalAmdExternalAsGlobal: this.target === "umd2",
|
||||
namedDefine: this.umdNamedDefine,
|
||||
auxilaryComment: this.auxilaryComment
|
||||
auxiliaryComment: this.auxiliaryComment
|
||||
}));
|
||||
break;
|
||||
case "jsonp":
|
||||
|
|
|
|||
|
|
@ -108,6 +108,8 @@ UmdMainTemplatePlugin.prototype.apply = function(compilation) {
|
|||
amdFactory = "factory";
|
||||
}
|
||||
|
||||
console.log("AUXILIARY COMMENT DAMNIT", this.auxiliaryComment);
|
||||
|
||||
return new ConcatSource(new OriginalSource(
|
||||
"(function webpackUniversalModuleDefinition(root, factory) {\n" +
|
||||
" //" + (this.auxiliaryComment && typeof this.auxiliaryComment === 'string' ? this.auxiliaryComment : (this.auxiliaryComment.commonjs2 || "")) +
|
||||
|
|
|
|||
Loading…
Reference in New Issue