Options for creating an import map without writing it to disk.
-
additionalImports: Readonly<Record<string, string>>
Explicit entries merged after manifest imports and packages, overriding duplicate keys. Defaults to none.
-
conditions: readonly string[]
Conditional import keys to try in order. Defaults to
import, thendefault. -
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.
-
manifest: string
Manifest path relative to root. Defaults to
package.json. -
packages: Readonly<Record<string, string>>
Package specifiers mapped to targets, each expanded to a conformant bare and trailing-slash pair. Defaults to none.
-
relativeTo: PathOrUrl
Directory the generated import map will be read from, as a path or
file://URL. -
root: PathOrUrl
Project directory containing the package
manifest, as a path orfile://URL. -
scopes: Readonly<Record<string,
Readonly<Record<string,
string>>>>
Scope-specific import overrides keyed by scope prefix, following Deno's scoped mappings. Defaults to none.
Options for creating and writing an import map.
-
indent: string
|
number
Indentation for the serialized map, with the semantics of
JSON.stringify's space parameter: a number of spaces per level or a literal indent string. Defaults to a tab. - out: PathOrUrl
A filesystem location as a path string or file:// URL,
accepted wherever an option names a directory or file.
A matcher for filter, tested against a candidate target path such as ./dist/internal-qo9O8jzH.js. A target is kept only when every
matcher accepts it.