animate/webGl/my-threejs-test/node_modules/@parcel/runtime-js/lib/helpers/bundle-manifest.js

20 lines
512 B
JavaScript
Raw Normal View History

2024-06-24 09:24:00 +00:00
"use strict";
var mapping = new Map();
function register(baseUrl, manifest) {
for (var i = 0; i < manifest.length - 1; i += 2) {
mapping.set(manifest[i], {
baseUrl: baseUrl,
path: manifest[i + 1]
});
}
}
function resolve(id) {
var resolved = mapping.get(id);
if (resolved == null) {
throw new Error('Could not resolve bundle with id ' + id);
}
return new URL(resolved.path, resolved.baseUrl).toString();
}
module.exports.register = register;
module.exports.resolve = resolve;