| 
									
										
										
										
											2018-11-23 16:37:33 +08:00
										 |  |  | /* | 
					
						
							|  |  |  | 	MIT License http://www.opensource.org/licenses/mit-license.php
 | 
					
						
							|  |  |  | */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | "use strict"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | const RuntimeGlobals = require("../RuntimeGlobals"); | 
					
						
							|  |  |  | const RuntimeModule = require("../RuntimeModule"); | 
					
						
							|  |  |  | const Template = require("../Template"); | 
					
						
							| 
									
										
										
										
											2020-06-29 17:46:16 +08:00
										 |  |  | const { | 
					
						
							|  |  |  | 	chunkHasJs, | 
					
						
							|  |  |  | 	getChunkFilenameTemplate | 
					
						
							|  |  |  | } = require("../javascript/JavascriptModulesPlugin"); | 
					
						
							| 
									
										
										
										
											2021-03-15 02:54:34 +08:00
										 |  |  | const { getInitialChunkIds } = require("../javascript/StartupHelpers"); | 
					
						
							| 
									
										
										
										
											2019-05-22 19:07:10 +08:00
										 |  |  | const compileBooleanMatcher = require("../util/compileBooleanMatcher"); | 
					
						
							| 
									
										
										
										
											2020-08-04 04:55:51 +08:00
										 |  |  | const { getUndoPath } = require("../util/identifier"); | 
					
						
							| 
									
										
										
										
											2018-11-23 16:37:33 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | class ReadFileChunkLoadingRuntimeModule extends RuntimeModule { | 
					
						
							| 
									
										
										
										
											2019-08-27 02:21:07 +08:00
										 |  |  | 	constructor(runtimeRequirements) { | 
					
						
							| 
									
										
										
										
											2020-12-11 21:32:42 +08:00
										 |  |  | 		super("readFile chunk loading", RuntimeModule.STAGE_ATTACH); | 
					
						
							| 
									
										
										
										
											2018-11-28 20:07:40 +08:00
										 |  |  | 		this.runtimeRequirements = runtimeRequirements; | 
					
						
							| 
									
										
										
										
											2018-11-23 16:37:33 +08:00
										 |  |  | 	} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	/** | 
					
						
							|  |  |  | 	 * @returns {string} runtime code | 
					
						
							|  |  |  | 	 */ | 
					
						
							|  |  |  | 	generate() { | 
					
						
							| 
									
										
										
										
											2021-04-13 02:53:25 +08:00
										 |  |  | 		const { chunkGraph, chunk } = this; | 
					
						
							|  |  |  | 		const { runtimeTemplate } = this.compilation; | 
					
						
							| 
									
										
										
										
											2018-11-23 16:37:33 +08:00
										 |  |  | 		const fn = RuntimeGlobals.ensureChunkHandlers; | 
					
						
							| 
									
										
										
										
											2020-08-29 04:39:07 +08:00
										 |  |  | 		const withBaseURI = this.runtimeRequirements.has(RuntimeGlobals.baseURI); | 
					
						
							| 
									
										
										
										
											2020-06-29 17:46:16 +08:00
										 |  |  | 		const withExternalInstallChunk = this.runtimeRequirements.has( | 
					
						
							|  |  |  | 			RuntimeGlobals.externalInstallChunk | 
					
						
							|  |  |  | 		); | 
					
						
							| 
									
										
										
										
											2021-03-09 03:18:49 +08:00
										 |  |  | 		const withOnChunkLoad = this.runtimeRequirements.has( | 
					
						
							|  |  |  | 			RuntimeGlobals.onChunksLoaded | 
					
						
							|  |  |  | 		); | 
					
						
							| 
									
										
										
										
											2018-11-28 20:07:40 +08:00
										 |  |  | 		const withLoading = this.runtimeRequirements.has( | 
					
						
							|  |  |  | 			RuntimeGlobals.ensureChunkHandlers | 
					
						
							|  |  |  | 		); | 
					
						
							|  |  |  | 		const withHmr = this.runtimeRequirements.has( | 
					
						
							|  |  |  | 			RuntimeGlobals.hmrDownloadUpdateHandlers | 
					
						
							|  |  |  | 		); | 
					
						
							|  |  |  | 		const withHmrManifest = this.runtimeRequirements.has( | 
					
						
							|  |  |  | 			RuntimeGlobals.hmrDownloadManifest | 
					
						
							|  |  |  | 		); | 
					
						
							| 
									
										
										
										
											2021-03-09 03:18:49 +08:00
										 |  |  | 		const conditionMap = chunkGraph.getChunkConditionMap(chunk, chunkHasJs); | 
					
						
							|  |  |  | 		const hasJsMatcher = compileBooleanMatcher(conditionMap); | 
					
						
							| 
									
										
										
										
											2021-03-15 02:54:34 +08:00
										 |  |  | 		const initialChunkIds = getInitialChunkIds(chunk, chunkGraph); | 
					
						
							| 
									
										
										
										
											2020-06-29 17:46:16 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-08-04 04:55:51 +08:00
										 |  |  | 		const outputName = this.compilation.getPath( | 
					
						
							|  |  |  | 			getChunkFilenameTemplate(chunk, this.compilation.outputOptions), | 
					
						
							|  |  |  | 			{ | 
					
						
							|  |  |  | 				chunk, | 
					
						
							|  |  |  | 				contentHashType: "javascript" | 
					
						
							|  |  |  | 			} | 
					
						
							|  |  |  | 		); | 
					
						
							| 
									
										
										
										
											2021-03-16 20:07:45 +08:00
										 |  |  | 		const rootOutputDir = getUndoPath( | 
					
						
							|  |  |  | 			outputName, | 
					
						
							|  |  |  | 			this.compilation.outputOptions.path, | 
					
						
							|  |  |  | 			false | 
					
						
							|  |  |  | 		); | 
					
						
							| 
									
										
										
										
											2020-06-29 17:46:16 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-08-16 15:43:50 +08:00
										 |  |  | 		const stateExpression = withHmr | 
					
						
							|  |  |  | 			? `${RuntimeGlobals.hmrRuntimeStatePrefix}_readFileVm` | 
					
						
							|  |  |  | 			: undefined; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-11-23 16:37:33 +08:00
										 |  |  | 		return Template.asString([ | 
					
						
							| 
									
										
										
										
											2020-08-29 04:39:07 +08:00
										 |  |  | 			withBaseURI | 
					
						
							|  |  |  | 				? Template.asString([ | 
					
						
							|  |  |  | 						`${RuntimeGlobals.baseURI} = require("url").pathToFileURL(${ | 
					
						
							|  |  |  | 							rootOutputDir | 
					
						
							|  |  |  | 								? `__dirname + ${JSON.stringify("/" + rootOutputDir)}` | 
					
						
							|  |  |  | 								: "__filename" | 
					
						
							|  |  |  | 						});`
 | 
					
						
							|  |  |  | 				  ]) | 
					
						
							|  |  |  | 				: "// no baseURI", | 
					
						
							|  |  |  | 			"", | 
					
						
							| 
									
										
										
										
											2018-11-23 16:37:33 +08:00
										 |  |  | 			"// object to store loaded chunks", | 
					
						
							|  |  |  | 			'// "0" means "already loaded", Promise means loading', | 
					
						
							| 
									
										
										
										
											2021-08-16 15:43:50 +08:00
										 |  |  | 			`var installedChunks = ${ | 
					
						
							|  |  |  | 				stateExpression ? `${stateExpression} = ${stateExpression} || ` : "" | 
					
						
							|  |  |  | 			}{`,
 | 
					
						
							| 
									
										
										
										
											2018-11-23 16:37:33 +08:00
										 |  |  | 			Template.indent( | 
					
						
							| 
									
										
										
										
											2021-03-15 02:54:34 +08:00
										 |  |  | 				Array.from(initialChunkIds, id => `${JSON.stringify(id)}: 0`).join( | 
					
						
							|  |  |  | 					",\n" | 
					
						
							|  |  |  | 				) | 
					
						
							| 
									
										
										
										
											2018-11-23 16:37:33 +08:00
										 |  |  | 			), | 
					
						
							|  |  |  | 			"};", | 
					
						
							|  |  |  | 			"", | 
					
						
							| 
									
										
										
										
											2021-03-09 03:18:49 +08:00
										 |  |  | 			withOnChunkLoad | 
					
						
							|  |  |  | 				? `${ | 
					
						
							|  |  |  | 						RuntimeGlobals.onChunksLoaded | 
					
						
							| 
									
										
										
										
											2021-03-09 23:16:15 +08:00
										 |  |  | 				  }.readFileVm = ${runtimeTemplate.returningFunction( | 
					
						
							|  |  |  | 						"installedChunks[chunkId] === 0", | 
					
						
							|  |  |  | 						"chunkId" | 
					
						
							|  |  |  | 				  )};`
 | 
					
						
							| 
									
										
										
										
											2021-03-09 03:18:49 +08:00
										 |  |  | 				: "// no on chunks loaded", | 
					
						
							|  |  |  | 			"", | 
					
						
							| 
									
										
										
										
											2020-06-29 17:46:16 +08:00
										 |  |  | 			withLoading || withExternalInstallChunk | 
					
						
							|  |  |  | 				? `var installChunk = ${runtimeTemplate.basicFunction("chunk", [ | 
					
						
							|  |  |  | 						"var moreModules = chunk.modules, chunkIds = chunk.ids, runtime = chunk.runtime;", | 
					
						
							|  |  |  | 						"for(var moduleId in moreModules) {", | 
					
						
							|  |  |  | 						Template.indent([ | 
					
						
							|  |  |  | 							`if(${RuntimeGlobals.hasOwnProperty}(moreModules, moduleId)) {`, | 
					
						
							|  |  |  | 							Template.indent([ | 
					
						
							|  |  |  | 								`${RuntimeGlobals.moduleFactories}[moduleId] = moreModules[moduleId];` | 
					
						
							|  |  |  | 							]), | 
					
						
							|  |  |  | 							"}" | 
					
						
							|  |  |  | 						]), | 
					
						
							|  |  |  | 						"}", | 
					
						
							|  |  |  | 						`if(runtime) runtime(__webpack_require__);`, | 
					
						
							|  |  |  | 						"for(var i = 0; i < chunkIds.length; i++) {", | 
					
						
							|  |  |  | 						Template.indent([ | 
					
						
							| 
									
										
										
										
											2021-03-09 03:18:49 +08:00
										 |  |  | 							"if(installedChunks[chunkIds[i]]) {", | 
					
						
							|  |  |  | 							Template.indent(["installedChunks[chunkIds[i]][0]();"]), | 
					
						
							|  |  |  | 							"}", | 
					
						
							| 
									
										
										
										
											2020-06-29 17:46:16 +08:00
										 |  |  | 							"installedChunks[chunkIds[i]] = 0;" | 
					
						
							|  |  |  | 						]), | 
					
						
							|  |  |  | 						"}", | 
					
						
							| 
									
										
										
										
											2021-03-09 03:18:49 +08:00
										 |  |  | 						withOnChunkLoad ? `${RuntimeGlobals.onChunksLoaded}();` : "" | 
					
						
							| 
									
										
										
										
											2020-06-29 17:46:16 +08:00
										 |  |  | 				  ])};`
 | 
					
						
							|  |  |  | 				: "// no chunk install function needed", | 
					
						
							|  |  |  | 			"", | 
					
						
							| 
									
										
										
										
											2018-11-28 20:07:40 +08:00
										 |  |  | 			withLoading | 
					
						
							|  |  |  | 				? Template.asString([ | 
					
						
							|  |  |  | 						"// ReadFile + VM.run chunk loading for javascript", | 
					
						
							| 
									
										
										
										
											2018-11-29 21:42:16 +08:00
										 |  |  | 						`${fn}.readFileVm = function(chunkId, promises) {`, | 
					
						
							| 
									
										
										
										
											2019-05-22 19:07:10 +08:00
										 |  |  | 						hasJsMatcher !== false | 
					
						
							|  |  |  | 							? Template.indent([ | 
					
						
							|  |  |  | 									"", | 
					
						
							|  |  |  | 									"var installedChunkData = installedChunks[chunkId];", | 
					
						
							|  |  |  | 									'if(installedChunkData !== 0) { // 0 means "already installed".', | 
					
						
							| 
									
										
										
										
											2018-11-23 16:37:33 +08:00
										 |  |  | 									Template.indent([ | 
					
						
							| 
									
										
										
										
											2019-05-22 19:07:10 +08:00
										 |  |  | 										'// array of [resolve, reject, promise] means "currently loading"', | 
					
						
							|  |  |  | 										"if(installedChunkData) {", | 
					
						
							|  |  |  | 										Template.indent(["promises.push(installedChunkData[2]);"]), | 
					
						
							|  |  |  | 										"} else {", | 
					
						
							| 
									
										
										
										
											2018-11-28 20:07:40 +08:00
										 |  |  | 										Template.indent([ | 
					
						
							| 
									
										
										
										
											2019-05-22 19:07:10 +08:00
										 |  |  | 											hasJsMatcher === true | 
					
						
							|  |  |  | 												? "if(true) { // all chunks have JS" | 
					
						
							|  |  |  | 												: `if(${hasJsMatcher("chunkId")}) {`, | 
					
						
							| 
									
										
										
										
											2018-11-28 20:07:40 +08:00
										 |  |  | 											Template.indent([ | 
					
						
							| 
									
										
										
										
											2019-05-22 19:07:10 +08:00
										 |  |  | 												"// load the chunk and return promise to it", | 
					
						
							|  |  |  | 												"var promise = new Promise(function(resolve, reject) {", | 
					
						
							| 
									
										
										
										
											2018-11-28 20:07:40 +08:00
										 |  |  | 												Template.indent([ | 
					
						
							| 
									
										
										
										
											2019-05-22 19:07:10 +08:00
										 |  |  | 													"installedChunkData = installedChunks[chunkId] = [resolve, reject];", | 
					
						
							| 
									
										
										
										
											2020-08-04 04:55:51 +08:00
										 |  |  | 													`var filename = require('path').join(__dirname, ${JSON.stringify( | 
					
						
							|  |  |  | 														rootOutputDir | 
					
						
							|  |  |  | 													)} + ${ | 
					
						
							|  |  |  | 														RuntimeGlobals.getChunkScriptFilename | 
					
						
							|  |  |  | 													}(chunkId));`,
 | 
					
						
							| 
									
										
										
										
											2019-05-22 19:07:10 +08:00
										 |  |  | 													"require('fs').readFile(filename, 'utf-8', function(err, content) {", | 
					
						
							|  |  |  | 													Template.indent([ | 
					
						
							|  |  |  | 														"if(err) return reject(err);", | 
					
						
							|  |  |  | 														"var chunk = {};", | 
					
						
							|  |  |  | 														"require('vm').runInThisContext('(function(exports, require, __dirname, __filename) {' + content + '\\n})', filename)" + | 
					
						
							|  |  |  | 															"(chunk, require, require('path').dirname(filename), filename);", | 
					
						
							| 
									
										
										
										
											2020-06-29 17:46:16 +08:00
										 |  |  | 														"installChunk(chunk);" | 
					
						
							| 
									
										
										
										
											2019-05-22 19:07:10 +08:00
										 |  |  | 													]), | 
					
						
							|  |  |  | 													"});" | 
					
						
							| 
									
										
										
										
											2018-11-28 20:07:40 +08:00
										 |  |  | 												]), | 
					
						
							| 
									
										
										
										
											2019-05-22 19:07:10 +08:00
										 |  |  | 												"});", | 
					
						
							|  |  |  | 												"promises.push(installedChunkData[2] = promise);" | 
					
						
							| 
									
										
										
										
											2018-11-28 20:07:40 +08:00
										 |  |  | 											]), | 
					
						
							| 
									
										
										
										
											2020-04-15 16:51:03 +08:00
										 |  |  | 											"} else installedChunks[chunkId] = 0;" | 
					
						
							| 
									
										
										
										
											2018-11-28 20:07:40 +08:00
										 |  |  | 										]), | 
					
						
							| 
									
										
										
										
											2019-05-22 19:07:10 +08:00
										 |  |  | 										"}" | 
					
						
							| 
									
										
										
										
											2018-11-23 16:37:33 +08:00
										 |  |  | 									]), | 
					
						
							| 
									
										
										
										
											2019-05-22 19:07:10 +08:00
										 |  |  | 									"}" | 
					
						
							|  |  |  | 							  ]) | 
					
						
							| 
									
										
										
										
											2020-04-15 16:51:03 +08:00
										 |  |  | 							: Template.indent(["installedChunks[chunkId] = 0;"]), | 
					
						
							| 
									
										
										
										
											2018-11-29 21:42:16 +08:00
										 |  |  | 						"};" | 
					
						
							| 
									
										
										
										
											2018-11-28 20:07:40 +08:00
										 |  |  | 				  ]) | 
					
						
							|  |  |  | 				: "// no chunk loading", | 
					
						
							|  |  |  | 			"", | 
					
						
							| 
									
										
										
										
											2020-06-29 17:46:16 +08:00
										 |  |  | 			withExternalInstallChunk | 
					
						
							|  |  |  | 				? Template.asString([ | 
					
						
							|  |  |  | 						"module.exports = __webpack_require__;", | 
					
						
							|  |  |  | 						`${RuntimeGlobals.externalInstallChunk} = installChunk;` | 
					
						
							|  |  |  | 				  ]) | 
					
						
							|  |  |  | 				: "// no external install chunk", | 
					
						
							|  |  |  | 			"", | 
					
						
							| 
									
										
										
										
											2018-11-28 20:07:40 +08:00
										 |  |  | 			withHmr | 
					
						
							|  |  |  | 				? Template.asString([ | 
					
						
							|  |  |  | 						"function loadUpdateChunk(chunkId, updatedModulesList) {", | 
					
						
							|  |  |  | 						Template.indent([ | 
					
						
							|  |  |  | 							"return new Promise(function(resolve, reject) {", | 
					
						
							|  |  |  | 							Template.indent([ | 
					
						
							| 
									
										
										
										
											2020-08-04 04:55:51 +08:00
										 |  |  | 								`var filename = require('path').join(__dirname, ${JSON.stringify( | 
					
						
							|  |  |  | 									rootOutputDir | 
					
						
							|  |  |  | 								)} + ${RuntimeGlobals.getChunkUpdateScriptFilename}(chunkId));`,
 | 
					
						
							| 
									
										
										
										
											2018-11-28 20:07:40 +08:00
										 |  |  | 								"require('fs').readFile(filename, 'utf-8', function(err, content) {", | 
					
						
							| 
									
										
										
										
											2018-11-23 16:37:33 +08:00
										 |  |  | 								Template.indent([ | 
					
						
							| 
									
										
										
										
											2018-11-28 20:07:40 +08:00
										 |  |  | 									"if(err) return reject(err);", | 
					
						
							|  |  |  | 									"var update = {};", | 
					
						
							|  |  |  | 									"require('vm').runInThisContext('(function(exports, require, __dirname, __filename) {' + content + '\\n})', filename)" + | 
					
						
							|  |  |  | 										"(update, require, require('path').dirname(filename), filename);", | 
					
						
							|  |  |  | 									"var updatedModules = update.modules;", | 
					
						
							|  |  |  | 									"var runtime = update.runtime;", | 
					
						
							|  |  |  | 									"for(var moduleId in updatedModules) {", | 
					
						
							| 
									
										
										
										
											2018-11-23 16:37:33 +08:00
										 |  |  | 									Template.indent([ | 
					
						
							| 
									
										
										
										
											2019-12-02 22:59:37 +08:00
										 |  |  | 										`if(${RuntimeGlobals.hasOwnProperty}(updatedModules, moduleId)) {`, | 
					
						
							| 
									
										
										
										
											2018-11-28 20:07:40 +08:00
										 |  |  | 										Template.indent([ | 
					
						
							|  |  |  | 											`currentUpdate[moduleId] = updatedModules[moduleId];`, | 
					
						
							|  |  |  | 											"if(updatedModulesList) updatedModulesList.push(moduleId);" | 
					
						
							|  |  |  | 										]), | 
					
						
							|  |  |  | 										"}" | 
					
						
							| 
									
										
										
										
											2018-11-23 16:37:33 +08:00
										 |  |  | 									]), | 
					
						
							| 
									
										
										
										
											2018-11-28 20:07:40 +08:00
										 |  |  | 									"}", | 
					
						
							| 
									
										
										
										
											2018-11-29 21:13:02 +08:00
										 |  |  | 									"if(runtime) currentUpdateRuntime.push(runtime);", | 
					
						
							| 
									
										
										
										
											2018-11-28 20:07:40 +08:00
										 |  |  | 									"resolve();" | 
					
						
							|  |  |  | 								]), | 
					
						
							|  |  |  | 								"});" | 
					
						
							|  |  |  | 							]), | 
					
						
							|  |  |  | 							"});" | 
					
						
							|  |  |  | 						]), | 
					
						
							|  |  |  | 						"}", | 
					
						
							|  |  |  | 						"", | 
					
						
							| 
									
										
										
										
											2020-04-15 16:51:03 +08:00
										 |  |  | 						Template.getFunctionContent( | 
					
						
							|  |  |  | 							require("../hmr/JavascriptHotModuleReplacement.runtime.js") | 
					
						
							|  |  |  | 						) | 
					
						
							|  |  |  | 							.replace(/\$key\$/g, "readFileVm") | 
					
						
							|  |  |  | 							.replace(/\$installedChunks\$/g, "installedChunks") | 
					
						
							|  |  |  | 							.replace(/\$loadUpdateChunk\$/g, "loadUpdateChunk") | 
					
						
							|  |  |  | 							.replace(/\$moduleCache\$/g, RuntimeGlobals.moduleCache) | 
					
						
							|  |  |  | 							.replace(/\$moduleFactories\$/g, RuntimeGlobals.moduleFactories) | 
					
						
							|  |  |  | 							.replace( | 
					
						
							|  |  |  | 								/\$ensureChunkHandlers\$/g, | 
					
						
							|  |  |  | 								RuntimeGlobals.ensureChunkHandlers | 
					
						
							|  |  |  | 							) | 
					
						
							|  |  |  | 							.replace(/\$hasOwnProperty\$/g, RuntimeGlobals.hasOwnProperty) | 
					
						
							|  |  |  | 							.replace(/\$hmrModuleData\$/g, RuntimeGlobals.hmrModuleData) | 
					
						
							|  |  |  | 							.replace( | 
					
						
							|  |  |  | 								/\$hmrDownloadUpdateHandlers\$/g, | 
					
						
							|  |  |  | 								RuntimeGlobals.hmrDownloadUpdateHandlers | 
					
						
							|  |  |  | 							) | 
					
						
							|  |  |  | 							.replace( | 
					
						
							|  |  |  | 								/\$hmrInvalidateModuleHandlers\$/g, | 
					
						
							|  |  |  | 								RuntimeGlobals.hmrInvalidateModuleHandlers | 
					
						
							|  |  |  | 							) | 
					
						
							| 
									
										
										
										
											2018-11-28 20:07:40 +08:00
										 |  |  | 				  ]) | 
					
						
							|  |  |  | 				: "// no HMR", | 
					
						
							|  |  |  | 			"", | 
					
						
							|  |  |  | 			withHmrManifest | 
					
						
							|  |  |  | 				? Template.asString([ | 
					
						
							|  |  |  | 						`${RuntimeGlobals.hmrDownloadManifest} = function() {`, | 
					
						
							|  |  |  | 						Template.indent([ | 
					
						
							|  |  |  | 							"return new Promise(function(resolve, reject) {", | 
					
						
							|  |  |  | 							Template.indent([ | 
					
						
							| 
									
										
										
										
											2020-08-04 04:55:51 +08:00
										 |  |  | 								`var filename = require('path').join(__dirname, ${JSON.stringify( | 
					
						
							|  |  |  | 									rootOutputDir | 
					
						
							|  |  |  | 								)} + ${RuntimeGlobals.getUpdateManifestFilename}());`,
 | 
					
						
							| 
									
										
										
										
											2018-11-28 20:07:40 +08:00
										 |  |  | 								"require('fs').readFile(filename, 'utf-8', function(err, content) {", | 
					
						
							|  |  |  | 								Template.indent([ | 
					
						
							|  |  |  | 									"if(err) {", | 
					
						
							|  |  |  | 									Template.indent([ | 
					
						
							|  |  |  | 										'if(err.code === "ENOENT") return resolve();', | 
					
						
							|  |  |  | 										"return reject(err);" | 
					
						
							|  |  |  | 									]), | 
					
						
							|  |  |  | 									"}", | 
					
						
							|  |  |  | 									"try { resolve(JSON.parse(content)); }", | 
					
						
							|  |  |  | 									"catch(e) { reject(e); }" | 
					
						
							|  |  |  | 								]), | 
					
						
							|  |  |  | 								"});" | 
					
						
							| 
									
										
										
										
											2018-11-23 16:37:33 +08:00
										 |  |  | 							]), | 
					
						
							|  |  |  | 							"});" | 
					
						
							|  |  |  | 						]), | 
					
						
							| 
									
										
										
										
											2018-11-28 20:07:40 +08:00
										 |  |  | 						"}" | 
					
						
							|  |  |  | 				  ]) | 
					
						
							|  |  |  | 				: "// no HMR manifest" | 
					
						
							| 
									
										
										
										
											2018-11-23 16:37:33 +08:00
										 |  |  | 		]); | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | module.exports = ReadFileChunkLoadingRuntimeModule; |