ManifestJson
manifest.json
is a manifest file generated by the Esmx framework during the build process, used to record the artifact information of service builds. It provides a unified interface to manage build artifacts, export files, and resource statistics.
Type Definitions
ManifestJson
interface ManifestJson {
name: string;
imports: Record<string, string>;
scopes: Record<string, Record<string, string>>;
exports: ManifestJsonExports;
files: string[];
chunks: ManifestJsonChunks;
}
name
- Type:
string
- Description: Module name, from the name in module configuration
imports
- Type:
Record<string, string>
- Description: Import mapping configuration, key is local import name, value is corresponding build file path
scopes
- Type:
Record<string, Record<string, string>>
- Description: Scope-specific import mappings, key is scope name, value is import mappings within that scope
exports
- Type:
ManifestJsonExports
- Description: Export item configuration mapping, key is export path, value is export item information
files
- Type:
string[]
- Description: Complete list of build output files, containing all generated file paths
chunks
- Type:
ManifestJsonChunks
- Description: Compiled file information, key is source file, value is compilation information
ManifestJsonExports
type ManifestJsonExports = Record<string, ManifestJsonExport>;
Export item configuration mapping, key is export path, value is export item information.
ManifestJsonExport
interface ManifestJsonExport {
name: string;
pkg: boolean;
file: string;
identifier: string;
}
name
- Type:
string
- Description: Export item name
pkg
- Type:
boolean
- Description: Whether it is a software package
file
- Type:
string
- Description: File path corresponding to the export item
identifier
- Type:
string
- Description: Unique identifier of the export item
ManifestJsonChunks
type ManifestJsonChunks = Record<string, ManifestJsonChunk>;
Compiled file information mapping, key is source file, value is compilation information.
ManifestJsonChunk
interface ManifestJsonChunk {
name: string;
js: string;
css: string[];
resources: string[];
}
name
- Type:
string
- Description: Identifier of the current source file
js
- Type:
string
- Description: JS file path after compiling the current source file
css
- Type:
string[]
- Description: List of CSS file paths associated with the current source file
resources
- Type:
string[]
- Description: List of other resource file paths associated with the current source file