| 
									
										
										
										
											2017-10-30 20:56:57 +08:00
										 |  |  | /* | 
					
						
							|  |  |  | 	MIT License http://www.opensource.org/licenses/mit-license.php
 | 
					
						
							|  |  |  | 	Author Tobias Koppers @sokra | 
					
						
							|  |  |  | */ | 
					
						
							|  |  |  | "use strict"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | const FetchCompileWasmMainTemplatePlugin = require("./FetchCompileWasmMainTemplatePlugin"); | 
					
						
							| 
									
										
										
										
											2017-12-14 08:21:44 +08:00
										 |  |  | const WasmModuleTemplatePlugin = require("../wasm/WasmModuleTemplatePlugin"); | 
					
						
							| 
									
										
										
										
											2017-10-30 20:56:57 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | class FetchCompileWasmTemplatePlugin { | 
					
						
							|  |  |  | 	apply(compiler) { | 
					
						
							| 
									
										
										
										
											2017-12-06 22:01:25 +08:00
										 |  |  | 		compiler.hooks.thisCompilation.tap("FetchCompileWasmTemplatePlugin", (compilation) => { | 
					
						
							| 
									
										
										
										
											2017-12-20 16:53:33 +08:00
										 |  |  | 			new FetchCompileWasmMainTemplatePlugin().apply(compilation.mainTemplate); | 
					
						
							|  |  |  | 			new WasmModuleTemplatePlugin().apply(compilation.moduleTemplates.javascript); | 
					
						
							| 
									
										
										
										
											2017-10-30 20:56:57 +08:00
										 |  |  | 		}); | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | module.exports = FetchCompileWasmTemplatePlugin; |