--build-snapshot-config


稳定性: 1 - 实验性

指定 JSON 配置文件的路径,该文件用于配置快照创建行为。

【Specifies the path to a JSON configuration file which configures snapshot creation behavior.】

目前支持以下选项:

【The following options are currently supported:】

  • builder <string> 必填。提供在构建快照之前执行的脚本名称,就像使用 builder 作为主脚本名称传递了 --build-snapshot 一样。
  • withoutCodeCache <boolean> 可选。包含代码缓存可以减少对快照中包含的函数进行编译所花费的时间,但代价是快照体积更大,且可能会破坏快照的可移植性。

使用此标志时,命令行中提供的额外脚本文件将不会被执行,而是被解释为普通的命令行参数。

【When using this flag, additional script files provided on the command line will not be executed and instead be interpreted as regular command line arguments.】