Categories
interface Config
extends Partial<WriteImportMapOptions>

An importmapify config file: the shape a config file's default export and defineConfig take. Every field is optional; the config loader and CLI supply root and the remaining defaults.

Examples

Example 1

// importmapify.config.ts; root is omitted, so it defaults to this file's directory.
import { defineConfig } from 'jsr:@kjanat/importmapify';

export default defineConfig({
  packages: { dreamcli: 'jsr:@kjanat/dreamcli@^3' },
  extensions: ['ts'],
});

Properties

readonly
optional
hooks: Partial<ImportMapHooks>

Lifecycle hooks the CLI runs around generation. Ignored by writeImportMap and createImportMap.