Options for creating an import map without writing it to disk.
Project directory containing the package manifest, as a
path or file:// URL.
manifest: string
Manifest path relative to root. Defaults to package.json.
conditions: readonly string[]
Conditional import keys to try in order. Defaults to import, then default.
packages: Readonly<Record<string,
string>>
Package specifiers mapped to targets, each expanded to a conformant bare and trailing-slash pair. Defaults to none.
additionalImports: Readonly<Record<string,
string>>
Explicit entries merged after manifest imports and packages, overriding duplicate keys. Defaults to none.
scopes: Readonly<Record<string,
Readonly<Record<string,
string>>>>
Scope-specific import overrides keyed by scope prefix, following Deno's scoped mappings. Defaults to none.
relativeTo: PathOrUrl
Directory the generated import map will be read from, as a path or
file:// URL.
Manifest targets are written relative to root, but Deno resolves an import map's relative targets from the location of the map file. Each relative target is rewritten to be relative to this directory instead, so it still points at the right file once the map moves. writeImportMap and the CLI set this automatically to the output file's directory; set it yourself only when placing an in-memory map somewhere other than root. Defaults to root.
extensions: readonly string[]
Extension whitelist limiting which pattern targets are kept, with or without leading dots. Combines with filter. Unset keeps every extension.
filter: readonly TargetFilter[]
Matchers a candidate pattern target must pass, each tested against the target path. A target is kept only when every matcher accepts it. Combines with extensions. Unset keeps every target.