ManifestJson

manifest.json is a manifest file generated during the build process of the Esmx framework, used to record information about service build artifacts. It provides a unified interface for managing build artifacts, exported files, and resource size statistics.

dist/client/manifest.json
1{
2  "name": "your-app-name",
3  "exports": {
4    "src/entry.client": "src/entry.client.8537e1c3.final.mjs",
5    "src/title/index": "src/title/index.2d79c0c2.final.mjs"
6  },
7  "buildFiles": [
8    "src/entry.client.2e0a89bc.final.css",
9    "images/cat.ed79ef6b.final.jpeg",
10    "chunks/830.63b8fd4f.final.css",
11    "images/running-dog.76197e20.final.gif",
12    "chunks/473.42c1ae75.final.mjs",
13    "images/starry.d914a632.final.jpg",
14    "images/sun.429a7bc5.final.png",
15    "chunks/473.63b8fd4f.final.css",
16    "images/logo.3923d727.final.svg",
17    "chunks/534.63b8fd4f.final.css",
18    "src/title/index.2d79c0c2.final.mjs",
19    "src/entry.client.8537e1c3.final.mjs",
20    "chunks/534.e85c5440.final.mjs",
21    "chunks/830.cdbdf067.final.mjs"
22  ],
23  "chunks": {
24    "your-app-name@src/views/home.ts": {
25      "js": "chunks/534.e85c5440.final.mjs",
26      "css": ["chunks/534.63b8fd4f.final.css"],
27      "resources": [
28        "images/cat.ed79ef6b.final.jpeg",
29        "images/logo.3923d727.final.svg",
30        "images/running-dog.76197e20.final.gif",
31        "images/starry.d914a632.final.jpg",
32        "images/sun.429a7bc5.final.png"
33      ],
34      "sizes": {
35        "js": 7976,
36        "css": 5739,
37        "resource": 796974
38      }
39    }
40  }
41}

Type Definitions

ManifestJson

1interface ManifestJson {
2  name: string;
3  exports: Record<string, string>;
4  buildFiles: string[];
5  chunks: Record<string, ManifestJsonChunks>;
6}

name

  • Type: string

Service name, derived from EsmxOptions.name configuration.

exports

  • Type: Record<string, string>

Mapping of exported files, where the key is the source file path and the value is the built file path.

buildFiles

  • Type: string[]

Complete list of build artifacts, containing all generated file paths.

chunks

  • Type: Record<string, ManifestJsonChunks>

Correspondence between source files and compiled artifacts, where the key is the source file path and the value is compilation information.

ManifestJsonChunks

1interface ManifestJsonChunks {
2  js: string;
3  css: string[];
4  resources: string[];
5  sizes: ManifestJsonChunkSizes;
6}

js

  • Type: string

Path to the compiled JS file for the current source file.

css

  • Type: string[]

List of CSS file paths associated with the current source file.

resources

  • Type: string[]

List of other resource file paths associated with the current source file.

sizes

  • Type: ManifestJsonChunkSizes

Size statistics of build artifacts.

ManifestJsonChunkSizes

1interface ManifestJsonChunkSizes {
2  js: number;
3  css: number;
4  resource: number;
5}

js

  • Type: number

JS file size (in bytes).

css

  • Type: number

CSS file size (in bytes).

resource

  • Type: number

Resource file size (in bytes).