Skip to content

loadImportMap

loadImportMap(denoJsonPath): Promise<Record<string, string> | null>

Load import map from a deno.json file

ParameterTypeDescription
denoJsonPathstringPath to deno.json file

Promise<Record<string, string> | null>

Import map object or null if not found

const importMap = await loadImportMap('./deno.json')
const bundled = await bundleCode({
code: myCode,
importMap,
})