ManifestJson
manifest.json is the manifest file generated by the Esmx framework during the build process, used to record build artifact information. It provides a unified interface to manage build artifacts, export files, and resource statistics.
Type Definition
ManifestJson
interface ManifestJson {
name: string;
scopes: Record<string, Record<string, string>>;
exports: ManifestJsonExports;
files: string[];
chunks: ManifestJsonChunks;
}
name
- Type:
string
- Description: Module name, sourced from the name in the module configuration
scopes
- Type:
Record<string, Record<string, string>>
- Description:
ImportMap scope mapping, where keys are scope prefixes and values are specifier -> resolved mappings for runtime path-based dependency resolution
exports
- Type:
ManifestJsonExports
- Description: Export configuration mapping, where keys are export paths and values are 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 mapping, where keys are source files and values are compilation details
ManifestJsonExports
type ManifestJsonExports = Record<string, ManifestJsonExport>;
Export item configuration mapping, where the key is the export path and the value is the 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 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, where the key is the source file and the value is the 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 the current source file compilation
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