| 
									
										
										
										
											2013-01-31 01:49:25 +08:00
										 |  |  | /* | 
					
						
							|  |  |  | 	MIT License http://www.opensource.org/licenses/mit-license.php
 | 
					
						
							|  |  |  | 	Author Tobias Koppers @sokra | 
					
						
							|  |  |  | */ | 
					
						
							| 
									
										
										
										
											2014-06-03 03:23:53 +08:00
										 |  |  | var NodeMainTemplatePlugin = require("./NodeMainTemplatePlugin"); | 
					
						
							| 
									
										
										
										
											2014-06-03 05:40:50 +08:00
										 |  |  | var NodeChunkTemplatePlugin = require("./NodeChunkTemplatePlugin"); | 
					
						
							| 
									
										
										
										
											2014-06-03 06:14:46 +08:00
										 |  |  | var NodeHotUpdateChunkTemplatePlugin = require("./NodeHotUpdateChunkTemplatePlugin"); | 
					
						
							| 
									
										
										
										
											2013-01-31 01:49:25 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-11-20 15:38:15 +08:00
										 |  |  | function NodeTemplatePlugin(options) { | 
					
						
							|  |  |  | 	options = options || {}; | 
					
						
							|  |  |  | 	this.asyncChunkLoading = options.asyncChunkLoading; | 
					
						
							| 
									
										
										
										
											2013-01-31 01:49:25 +08:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2013-03-01 16:44:58 +08:00
										 |  |  | module.exports = NodeTemplatePlugin; | 
					
						
							|  |  |  | NodeTemplatePlugin.prototype.apply = function(compiler) { | 
					
						
							| 
									
										
										
										
											2014-06-03 03:23:53 +08:00
										 |  |  | 	compiler.plugin("this-compilation", function(compilation) { | 
					
						
							|  |  |  | 		compilation.mainTemplate.apply(new NodeMainTemplatePlugin(this.asyncChunkLoading)); | 
					
						
							| 
									
										
										
										
											2014-06-03 05:40:50 +08:00
										 |  |  | 		compilation.chunkTemplate.apply(new NodeChunkTemplatePlugin()); | 
					
						
							| 
									
										
										
										
											2014-06-03 06:14:46 +08:00
										 |  |  | 		compilation.hotUpdateChunkTemplate.apply(new NodeHotUpdateChunkTemplatePlugin()); | 
					
						
							| 
									
										
										
										
											2014-06-03 03:23:53 +08:00
										 |  |  | 	}.bind(this)); | 
					
						
							| 
									
										
										
										
											2013-03-01 16:44:58 +08:00
										 |  |  | }; |