Skip to content

Commit 164e33b

Browse files
author
Sean Larkin
committed
Fixed strings
1 parent b607e97 commit 164e33b

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

‎lib/UmdMainTemplatePlugin.js‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,10 @@ UmdMainTemplatePlugin.prototype.apply = function(compilation) {
110110

111111
return new ConcatSource(new OriginalSource(
112112
"(function webpackUniversalModuleDefinition(root, factory) {\n" +
113-
" //" + (this.auxiliaryComment && typeof this.auxiliaryComment === string ? this.auxiliaryComment : (this.auxiliaryComment.commonjs2 || "")) +
113+
" //" + (this.auxiliaryComment && typeof this.auxiliaryComment === 'string' ? this.auxiliaryComment : (this.auxiliaryComment.commonjs2 || "")) +
114114
" if(typeof exports === 'object' && typeof module === 'object')\n" +
115115
" module.exports = factory(" + externalsRequireArray("commonjs2") + ");\n" +
116-
" //" + (this.auxiliaryComment && typeof this.auxiliaryComment === string ? this.auxiliaryComment : (this.auxiliaryComment.amd || "")) +
116+
" //" + (this.auxiliaryComment && typeof this.auxiliaryComment === 'string' ? this.auxiliaryComment : (this.auxiliaryComment.amd || "")) +
117117
" else if(typeof define === 'function' && define.amd)\n" +
118118
(requiredExternals.length > 0 ?
119119
(this.name && this.namedDefine === true ?
@@ -126,12 +126,12 @@ UmdMainTemplatePlugin.prototype.apply = function(compilation) {
126126
)
127127
) +
128128
(this.name ?
129-
" //" + (this.auxiliaryComment && typeof this.auxiliaryComment === string ? this.auxiliaryComment : (this.auxiliaryComment.commonjs || "")) +
129+
" //" + (this.auxiliaryComment && typeof this.auxiliaryComment === 'string' ? this.auxiliaryComment : (this.auxiliaryComment.commonjs || "")) +
130130
" else if(typeof exports === 'object')\n" +
131131
" exports[" + libraryName(this.name) + "] = factory(" + externalsRequireArray("commonjs") + ");\n" +
132132
" else\n" +
133133
" " + replaceKeys(accessorAccess("root", this.name)) + " = factory(" + externalsRootArray(externals) + ");\n" :
134-
" //" + (this.auxiliaryComment && typeof this.auxiliaryComment === string ? this.auxiliaryComment : (this.auxiliaryComment.root || "")) +
134+
" //" + (this.auxiliaryComment && typeof this.auxiliaryComment === 'string' ? this.auxiliaryComment : (this.auxiliaryComment.root || "")) +
135135
" else {\n" +
136136
(externals.length > 0 ?
137137
" var a = typeof exports === 'object' ? factory(" + externalsRequireArray("commonjs") + ") : factory(" + externalsRootArray(externals) + ");\n" :

‎test/NodeTemplatePlugin.test.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ describe("NodeTemplatePlugin", function() {
4949
chunkFilename: "[hash].result2.[id].js",
5050
library: "def",
5151
libraryTarget: "umd",
52+
auxiliaryComment: "test"
5253
},
5354
entry: "./entry",
5455
plugins: [

0 commit comments

Comments
 (0)