| 
									
										
										
										
											2015-04-29 05:38:41 +08:00
										 |  |  | /* | 
					
						
							|  |  |  | 	MIT License http://www.opensource.org/licenses/mit-license.php
 | 
					
						
							|  |  |  | 	Author Tobias Koppers @sokra | 
					
						
							|  |  |  | */ | 
					
						
							| 
									
										
										
										
											2018-07-30 23:08:51 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | "use strict"; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-11-05 20:13:05 +08:00
										 |  |  | /*global installedChunks $hotChunkFilename$ __webpack_require__ hotAddUpdateChunk $hotMainFilename$ */ | 
					
						
							| 
									
										
										
										
											2018-07-30 23:08:51 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-04-29 05:38:41 +08:00
										 |  |  | module.exports = function() { | 
					
						
							| 
									
										
										
										
											2018-02-25 09:15:37 +08:00
										 |  |  | 	// eslint-disable-next-line no-unused-vars
 | 
					
						
							| 
									
										
										
										
											2018-02-25 09:00:20 +08:00
										 |  |  | 	function hotDownloadUpdateChunk(chunkId) { | 
					
						
							| 
									
										
										
										
											2015-04-29 05:38:41 +08:00
										 |  |  | 		var filename = require("path").join(__dirname, $hotChunkFilename$); | 
					
						
							|  |  |  | 		require("fs").readFile(filename, "utf-8", function(err, content) { | 
					
						
							| 
									
										
										
										
											2018-02-25 09:00:20 +08:00
										 |  |  | 			if (err) { | 
					
						
							| 
									
										
										
										
											2018-11-05 20:13:05 +08:00
										 |  |  | 				if (__webpack_require__.onError) return __webpack_require__.oe(err); | 
					
						
							| 
									
										
										
										
											2018-05-29 20:50:40 +08:00
										 |  |  | 				throw err; | 
					
						
							| 
									
										
										
										
											2015-04-29 05:38:41 +08:00
										 |  |  | 			} | 
					
						
							|  |  |  | 			var chunk = {}; | 
					
						
							| 
									
										
										
										
											2018-02-25 09:00:20 +08:00
										 |  |  | 			require("vm").runInThisContext( | 
					
						
							|  |  |  | 				"(function(exports) {" + content + "\n})", | 
					
						
							| 
									
										
										
										
											2018-04-09 01:26:04 +08:00
										 |  |  | 				{ filename: filename } | 
					
						
							| 
									
										
										
										
											2018-02-25 09:00:20 +08:00
										 |  |  | 			)(chunk); | 
					
						
							| 
									
										
										
										
											2015-04-29 05:38:41 +08:00
										 |  |  | 			hotAddUpdateChunk(chunk.id, chunk.modules); | 
					
						
							|  |  |  | 		}); | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-02-25 09:15:37 +08:00
										 |  |  | 	// eslint-disable-next-line no-unused-vars
 | 
					
						
							| 
									
										
										
										
											2018-02-25 09:00:20 +08:00
										 |  |  | 	function hotDownloadManifest() { | 
					
						
							| 
									
										
										
										
											2015-04-29 05:38:41 +08:00
										 |  |  | 		var filename = require("path").join(__dirname, $hotMainFilename$); | 
					
						
							| 
									
										
										
										
											2015-06-13 17:45:28 +08:00
										 |  |  | 		return new Promise(function(resolve, reject) { | 
					
						
							|  |  |  | 			require("fs").readFile(filename, "utf-8", function(err, content) { | 
					
						
							| 
									
										
										
										
											2018-02-25 09:00:20 +08:00
										 |  |  | 				if (err) return resolve(); | 
					
						
							| 
									
										
										
										
											2015-06-13 17:45:28 +08:00
										 |  |  | 				try { | 
					
						
							|  |  |  | 					var update = JSON.parse(content); | 
					
						
							| 
									
										
										
										
											2018-02-25 09:00:20 +08:00
										 |  |  | 				} catch (e) { | 
					
						
							| 
									
										
										
										
											2015-06-13 17:45:28 +08:00
										 |  |  | 					return reject(e); | 
					
						
							|  |  |  | 				} | 
					
						
							|  |  |  | 				resolve(update); | 
					
						
							|  |  |  | 			}); | 
					
						
							| 
									
										
										
										
											2015-04-29 05:38:41 +08:00
										 |  |  | 		}); | 
					
						
							|  |  |  | 	} | 
					
						
							| 
									
										
										
										
											2016-07-18 06:41:26 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-06-27 19:48:13 +08:00
										 |  |  | 	// eslint-disable-next-line no-unused-vars
 | 
					
						
							| 
									
										
										
										
											2018-02-25 09:00:20 +08:00
										 |  |  | 	function hotDisposeChunk(chunkId) { | 
					
						
							| 
									
										
										
										
											2016-07-18 06:41:26 +08:00
										 |  |  | 		delete installedChunks[chunkId]; | 
					
						
							|  |  |  | 	} | 
					
						
							| 
									
										
										
										
											2015-04-29 05:38:41 +08:00
										 |  |  | }; |