UNPKG

@esmx/core

Version:

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

80 lines (79 loc) 1.93 kB
import type { BuildEnvironment } from './core'; import type { ParsedModuleConfig } from './module-config'; export interface ManifestJson { /** * Module name */ name: string; /** * Import mappings */ imports: Record<string, string>; /** * Scope-specific import mappings * Type: Record<scope name, import mappings within that scope> */ scopes: Record<string, Record<string, string>>; /** * Export item configuration * Type: Record<export path, export item information> */ exports: ManifestJsonExports; /** * Build output files */ files: string[]; /** * Compiled file information * Type: Record<source file, compilation information> */ chunks: ManifestJsonChunks; } /** * Export item configuration mapping * Type: Record<export path, export item information> */ export type ManifestJsonExports = Record<string, ManifestJsonExport>; /** * Export item information */ export interface ManifestJsonExport { /** * Export item name */ name: string; /** * Whether to rewrite module import paths * - true: Rewrite to '{serviceName}/{exportName}' format * - false: Maintain original import paths */ pkg: boolean; /** * File path corresponding to the export item */ file: string; /** * Identifier for the export item */ identifier: string; } export type ManifestJsonChunks = Record<string, ManifestJsonChunk>; export interface ManifestJsonChunk { name: string; /** * Current compiled JS file. */ js: string; /** * Current compiled CSS files. */ css: string[]; /** * Other resource files. */ resources: string[]; } /** * Get service manifest files */ export declare function getManifestList(env: BuildEnvironment, moduleConfig: ParsedModuleConfig): Promise<ManifestJson[]>;