MCPcopy Create free account
hub / github.com/observablehq/framework / getModuleResolver

Method getModuleResolver

src/loader.ts:322–324  ·  view source on GitHub ↗
(path: string, servePath?: string)

Source from the content-addressed store, hash-verified

320 }
321
322 getModuleResolver(path: string, servePath?: string): (specifier: string) => Promise<string> {
323 return getModuleResolver(this.root, path, servePath, (p) => this.getSourceFileHash(p));
324 }
325
326 resolveImportPath(path: string): string {
327 return resolveImportPath(this.root, path, (p) => this.getSourceFileHash(p));

Callers 2

PreviewServerClass · 0.80
buildFunction · 0.80

Calls 2

getSourceFileHashMethod · 0.95
getModuleResolverFunction · 0.85

Tested by

no test coverage detected