File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -147,15 +147,15 @@ UmdMainTemplatePlugin.prototype.apply = function(compilation) {
147147 ) +
148148 " else if(typeof exports === 'object')\n" +
149149 " exports[" + libraryName ( this . name ) + "] = factory(" + externalsRequireArray ( "commonjs" ) + ");\n" +
150- " else\n" +
151- " " + replaceKeys ( accessorAccess ( "root" , this . name ) ) + " = factory(" + externalsRootArray ( externals ) + ");\n" :
152150 ( this . auxiliaryComment &&
153151 typeof this . auxiliaryComment === 'string' ?
154152 " //" + this . auxiliaryComment + "\n" :
155153 this . auxiliaryComment . root ?
156154 " //" + this . auxiliaryComment . root + "\n" :
157155 ""
158156 ) +
157+ " else\n" +
158+ " " + replaceKeys ( accessorAccess ( "root" , this . name ) ) + " = factory(" + externalsRootArray ( externals ) + ");\n" :
159159 " else {\n" +
160160 ( externals . length > 0 ?
161161 " var a = typeof exports === 'object' ? factory(" + externalsRequireArray ( "commonjs" ) + ") : factory(" + externalsRootArray ( externals ) + ");\n" :
Original file line number Diff line number Diff line change @@ -6,8 +6,8 @@ it("should have auxiliary comments", function() {
66 var fs = require ( "fs" ) ;
77 var source = fs . readFileSync ( __filename , "utf-8" ) ;
88
9- source . should . containEql ( "//test comment commonjs" ) ;
10- source . should . containEql ( "//test comment commonjs2" ) ;
11- source . should . containEql ( "//test comment amd" ) ;
12- source . should . containEql ( "//test comment root" ) ;
9+ source . should . containEql ( "//test " + " comment " + " commonjs") ;
10+ source . should . containEql ( "//test " + " comment " + " commonjs2") ;
11+ source . should . containEql ( "//test " + " comment " + " amd") ;
12+ source . should . containEql ( "//test " + " comment " + " root") ;
1313} ) ;
Original file line number Diff line number Diff line change @@ -5,6 +5,6 @@ it("should run", function() {
55it ( "should have auxiliary comment string" , function ( ) {
66 var fs = require ( "fs" ) ;
77 var source = fs . readFileSync ( __filename , "utf-8" ) ;
8-
9- source . should . containEql ( "//test comment" ) ;
8+
9+ source . should . containEql ( "//test " + " comment") ;
1010} ) ;
You can’t perform that action at this time.
0 commit comments