UNPKG

@esmx/core

Version:

A high-performance microfrontend framework supporting Vue, React, Preact, Solid, and Svelte with SSR and Module Federation capabilities.

21 lines (20 loc) 959 B
import type { ImportMap, ScopesMap, SpecifierMap } from '@esmx/import'; export interface ImportMapManifest { name: string; imports: Record<string, string>; exports: Record<string, { name: string; file: string; identifier: string; pkg: boolean; }>; scopes: Record<string, Record<string, string>>; } export interface GetImportMapOptions { manifests: readonly ImportMapManifest[]; getScope: (name: string, scope: string) => string; getFile: (name: string, file: string) => string; } export declare function buildImportsMap(manifests: readonly ImportMapManifest[], getFile: (name: string, file: string) => string): SpecifierMap; export declare function buildScopesMap(imports: SpecifierMap, manifests: readonly ImportMapManifest[], getScope: (name: string, scope: string) => string): ScopesMap; export declare function getImportMap({ manifests, getFile, getScope }: GetImportMapOptions): ImportMap;