astro
Version:
Astro is a modern site builder with web best practices, performance, and DX front-of-mind.
36 lines (35 loc) • 893 B
JavaScript
import { joinPaths, prependForwardSlash } from "../../../core/path.js";
import { createPlaceholderURL, stringifyPlaceholderURL } from "../../utils/url.js";
class DevUrlResolver {
constructor({
base,
searchParams
}) {
this.
this.
}
resolve(id) {
this.
const urlPath = prependForwardSlash(joinPaths(this.
const url = createPlaceholderURL(urlPath);
this.
url.searchParams.set(key, value);
});
const result = stringifyPlaceholderURL(url);
this.
return result;
}
get cspResources() {
return this.
}
get urls() {
return Array.from(this.
}
}
export {
DevUrlResolver
};