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
protocol
- Type:
number - Description: Manifest protocol version (RFC 0001 §5), currently
2. Absent in pre-v2 manifests; readers treat absence as protocol 1 and skip v2-only checks. The linker rejects manifests whoseprotocolis higher than the supported version.
name
- Type:
string - Description: Module name, sourced from the module configuration
version
- Type:
string - Description: Module version, transcribed from the module's
package.jsonat build time (RFC 0001 §5). Pre-v2 manifests default to'0.0.0'at read time.
provides
- Type:
Record<string, ManifestJsonProvide> - Description: Resolved versions for every pkg-export (
pkg: true) package, captured at build time (RFC 0001 §5). Keys are package specifiers; values record the resolved installed version.
uses
- Type:
string[] - Description: Consumption edges transcribed from the module's
package.jsonesmx.usesdeclaration (RFC 0001 §5). Pre-v2 manifests default to[]at read time.
scopes
- Type:
Record<string, Record<string, string>> - Description:
ImportMapscope mapping, where keys are scope prefixes and values arespecifier -> resolvedmappings 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
integrity
- Type:
Record<string, string> - Description: Subresource Integrity (SRI) hashes for build output files, where keys are relative file paths and values are
sha384-integrity strings. Only generated in production builds to avoid development overhead. Consumed byRenderContext.modulePreload()and injected into the client import map.
ManifestJsonExports
An export item configuration mapping, where the key is the export path and the value is the export item information.
ManifestJsonProvide
Build-time facts about one provided (pkg-export) package (RFC 0001 §5).
version
- Type:
string - Description: The resolved installed version of the provided package at build time, read from
node_modules/<pkg>/package.jsonrelative to the module root. Subpath specifiers (e.g.vue/jsx-runtime) resolve via their parent package.'0.0.0'when the package could not be resolved.
ManifestJsonExport
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
A compiled file information mapping, where the key is the source file and the value is the compilation information.
ManifestJsonChunk
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