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

Function getModuleResolvers

src/resolvers.ts:181–191  ·  view source on GitHub ↗
(path: string, config: Omit<ResolversConfig, "path">)

Source from the content-addressed store, hash-verified

179
180/** Like getResolvers, but for JavaScript modules. */
181export async function getModuleResolvers(path: string, config: Omit<ResolversConfig, "path">): Promise<Resolvers> {
182 const {root} = config;
183 return {
184 path,
185 hash: getModuleHash(root, path),
186 assets: new Set(),
187 anchors: new Set(),
188 localLinks: new Set(),
189 ...(await resolveResolvers({localImports: [path], staticImports: [path]}, {path, ...config}))
190 };
191}
192
193async function resolveResolvers(
194 {

Callers 1

buildFunction · 0.85

Calls 2

getModuleHashFunction · 0.85
resolveResolversFunction · 0.85

Tested by

no test coverage detected