mirror of https://github.com/webpack/webpack.git
				
				
				
			realized that comments need return lines so that it doesn't break the subsequent line of logic
This commit is contained in:
		
							parent
							
								
									bcb251883c
								
							
						
					
					
						commit
						ff168bbb2f
					
				|  | @ -108,14 +108,12 @@ UmdMainTemplatePlugin.prototype.apply = function(compilation) { | ||||||
| 			amdFactory = "factory"; | 			amdFactory = "factory"; | ||||||
| 		} | 		} | ||||||
| 
 | 
 | ||||||
| 		console.log("AUXILIARY COMMENT DAMNIT", this.auxiliaryComment); |  | ||||||
| 
 |  | ||||||
| 		return new ConcatSource(new OriginalSource( | 		return new ConcatSource(new OriginalSource( | ||||||
| 			"(function webpackUniversalModuleDefinition(root, factory) {\n" + | 			"(function webpackUniversalModuleDefinition(root, factory) {\n" + | ||||||
| 			"   //" + (this.auxiliaryComment && typeof this.auxiliaryComment === 'string' ? this.auxiliaryComment : (this.auxiliaryComment.commonjs2 || "")) + | 			"   //" + (this.auxiliaryComment && typeof this.auxiliaryComment === 'string' ? this.auxiliaryComment : (this.auxiliaryComment.commonjs2 || "")) + "\n" + | ||||||
| 			"	if(typeof exports === 'object' && typeof module === 'object')\n" + | 			"	if(typeof exports === 'object' && typeof module === 'object')\n" + | ||||||
| 			"		module.exports = factory(" + externalsRequireArray("commonjs2") + ");\n" + | 			"		module.exports = factory(" + externalsRequireArray("commonjs2") + ");\n" + | ||||||
| 			"   //" + (this.auxiliaryComment && typeof this.auxiliaryComment === 'string' ? this.auxiliaryComment : (this.auxiliaryComment.amd || "")) + | 			"   //" + (this.auxiliaryComment && typeof this.auxiliaryComment === 'string' ? this.auxiliaryComment : (this.auxiliaryComment.amd || "")) + "\n" + | ||||||
| 			"	else if(typeof define === 'function' && define.amd)\n" + | 			"	else if(typeof define === 'function' && define.amd)\n" + | ||||||
| 			(requiredExternals.length > 0 ? | 			(requiredExternals.length > 0 ? | ||||||
| 				(this.name && this.namedDefine === true ? | 				(this.name && this.namedDefine === true ? | ||||||
|  | @ -128,12 +126,12 @@ UmdMainTemplatePlugin.prototype.apply = function(compilation) { | ||||||
| 				) | 				) | ||||||
| 			) + | 			) + | ||||||
| 			(this.name ? | 			(this.name ? | ||||||
| 				"   //" + (this.auxiliaryComment && typeof this.auxiliaryComment === 'string' ? this.auxiliaryComment : (this.auxiliaryComment.commonjs || "")) + | 				"   //" + (this.auxiliaryComment && typeof this.auxiliaryComment === 'string' ? this.auxiliaryComment : (this.auxiliaryComment.commonjs || "")) + "\n" + | ||||||
| 				"	else if(typeof exports === 'object')\n" + | 				"	else if(typeof exports === 'object')\n" + | ||||||
| 				"		exports[" + libraryName(this.name) + "] = factory(" + externalsRequireArray("commonjs") + ");\n" + | 				"		exports[" + libraryName(this.name) + "] = factory(" + externalsRequireArray("commonjs") + ");\n" + | ||||||
| 				"	else\n" + | 				"	else\n" + | ||||||
| 				"		" + replaceKeys(accessorAccess("root", this.name)) + " = factory(" + externalsRootArray(externals) + ");\n" : | 				"		" + replaceKeys(accessorAccess("root", this.name)) + " = factory(" + externalsRootArray(externals) + ");\n" : | ||||||
| 				"   //" + (this.auxiliaryComment && typeof this.auxiliaryComment === 'string' ? this.auxiliaryComment : (this.auxiliaryComment.root || "")) + | 				"   //" + (this.auxiliaryComment && typeof this.auxiliaryComment === 'string' ? this.auxiliaryComment : (this.auxiliaryComment.root || "")) + "\n" + | ||||||
| 				"	else {\n" + | 				"	else {\n" + | ||||||
| 				(externals.length > 0 ? | 				(externals.length > 0 ? | ||||||
| 					"		var a = typeof exports === 'object' ? factory(" + externalsRequireArray("commonjs") + ") : factory(" + externalsRootArray(externals) + ");\n" : | 					"		var a = typeof exports === 'object' ? factory(" + externalsRequireArray("commonjs") + ") : factory(" + externalsRootArray(externals) + ");\n" : | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue