| 
									
										
										
										
											2014-06-03 05:40:50 +08:00
										 |  |  | /* | 
					
						
							|  |  |  | 	MIT License http://www.opensource.org/licenses/mit-license.php
 | 
					
						
							|  |  |  | 	Author Tobias Koppers @sokra | 
					
						
							|  |  |  | */ | 
					
						
							| 
									
										
										
										
											2015-12-30 00:44:55 +08:00
										 |  |  | var ConcatSource = require("webpack-sources").ConcatSource; | 
					
						
							| 
									
										
										
										
											2014-06-03 05:40:50 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-07-13 06:20:09 +08:00
										 |  |  | function NodeChunkTemplatePlugin() {} | 
					
						
							| 
									
										
										
										
											2014-06-03 05:40:50 +08:00
										 |  |  | module.exports = NodeChunkTemplatePlugin; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | NodeChunkTemplatePlugin.prototype.apply = function(chunkTemplate) { | 
					
						
							|  |  |  | 	chunkTemplate.plugin("render", function(modules, chunk) { | 
					
						
							|  |  |  | 		var source = new ConcatSource(); | 
					
						
							|  |  |  | 		source.add("exports.ids = " + JSON.stringify(chunk.ids) + ";\nexports.modules = "); | 
					
						
							|  |  |  | 		source.add(modules); | 
					
						
							|  |  |  | 		source.add(";"); | 
					
						
							|  |  |  | 		return source; | 
					
						
							|  |  |  | 	}); | 
					
						
							|  |  |  | 	chunkTemplate.plugin("hash", function(hash) { | 
					
						
							|  |  |  | 		hash.update("node"); | 
					
						
							|  |  |  | 		hash.update("3"); | 
					
						
							|  |  |  | 	}); | 
					
						
							|  |  |  | }; |