function createResolvePathFromModule(resolver) {
    return function resolvePathFromModule(moduleId) {
        const exported = resolver(moduleId);
        const exportedPath = exported?.default ?? exported;
        if (typeof exportedPath !== 'string') {
            return exported;
        }
        const strippedAssetPrefix = exportedPath.slice(ASSET_PREFIX.length);
        const resolved = path.resolve(RUNTIME_ROOT, strippedAssetPrefix);
        return url.pathToFileURL(resolved).href;
    };
}
Returns an absolute path to the given module's id.