PackConfig
is the package bundling configuration interface used to package service build artifacts into standard npm .tgz format packages.
Whether to enable the packaging feature. When enabled, build artifacts will be packaged into standard npm .tgz format packages.
boolean
false
Specifies the output package file path(s). Supports the following configuration methods:
string
: Single output path, e.g., 'dist/versions/my-app.tgz'string[]
: Multiple output paths for generating multiple versions simultaneouslyboolean
: When true, uses the default path 'dist/client/versions/latest.tgz'Callback function for customizing package.json content. Called before packaging to modify package.json content.
esmx: Esmx
- Esmx instancepkg: any
- Original package.json contentPromise<any>
- Modified package.json contentCommon use cases:
Example:
Callback function for pre-packaging preparation work.
esmx: Esmx
- Esmx instancepkg: Record<string, any>
- package.json contentPromise<void>
Common use cases:
Example:
Callback function for post-packaging processing. Called after .tgz file generation to handle packaged artifacts.
esmx: Esmx
- Esmx instancepkg: Record<string, any>
- package.json contentfile: Buffer
- Packaged file contentPromise<void>
Common use cases:
Example: