resolveExternalResource(uri, rootFile, rootPath, assetMap) {
		const baseURL = LoaderUtils.extractUrlBase(rootFile);
		const normalizedURL =
			rootPath +
			decodeURI(uri) // validator applies URI encoding.
				.replace(baseURL, '')
				.replace(/^(\.?\/)/, '');

		let objectURL;

		if (assetMap.has(normalizedURL)) {
			const object = assetMap.get(normalizedURL);
			objectURL = URL.createObjectURL(object);
		}

		return fetch(objectURL || baseURL + uri)
			.then((response) => response.arrayBuffer())
			.then((buffer) => {
				if (objectURL) URL.revokeObjectURL(objectURL);
				return new Uint8Array(buffer);
			});
	}
Loads a resource (either locally or from the network) and returns it.
@param  {string} uri
@param  {string} rootFile
@param  {string} rootPath
@param  {Map<string, File>} assetMap
@return {Promise<Uint8Array>}