将准备好的数据块转储到磁盘


🌐 Dumping the preparation blob to disk

在引入 --build-sea 之前,引入了一个较旧的工作流程,用于将准备好的 blob 写入磁盘,以便由外部工具注入。这仍然可以用于验证目的。

🌐 Before --build-sea was introduced, an older workflow was introduced to write the preparation blob to disk for injection by external tools. This can still be used for verification purposes.

要将准备好的 blob 转储到磁盘以进行验证,请使用 --experimental-sea-config。 这将写入一个文件,可以使用像 后射 这样的工具注入到 Node.js 二进制文件中。

🌐 To dump the preparation blob to disk for verification, use --experimental-sea-config. This writes a file that can be injected into a Node.js binary using tools like postject.

该配置与 --build-sea 类似,只是 output 字段指定了写入生成的二进制文件的路径,而不是最终可执行文件的路径。

🌐 The configuration is similar to that of --build-sea, except that the output field specifies the path to write the generated blob file instead of the final executable.

{
  "main": "/path/to/bundled/script.js",
  // Instead of the final executable, this is the path to write the blob.
  "output": "/path/to/write/the/generated/blob.blob"
}