--snapshot-blob=path
¥Stability: 1 - Experimental
与 --build-snapshot
一起使用时,--snapshot-blob
指定写入生成的快照 blob 的路径。如果不指定,生成的 blob 会写入当前工作目录下的 snapshot.blob
。
¥When used with --build-snapshot
, --snapshot-blob
specifies the path
where the generated snapshot blob is written to. If not specified, the
generated blob is written to snapshot.blob
in the current working directory.
在没有 --build-snapshot
的情况下使用时,--snapshot-blob
指定用于恢复应用状态的 blob 的路径。
¥When used without --build-snapshot
, --snapshot-blob
specifies the
path to the blob that is used to restore the application state.
加载快照时,Node.js 检查:
¥When loading a snapshot, Node.js checks that:
-
正在运行的 Node.js 二进制文件的版本、体系结构和平台与生成快照的二进制文件完全相同。
¥The version, architecture, and platform of the running Node.js binary are exactly the same as that of the binary that generates the snapshot.
-
V8 标志和 CPU 功能与生成快照的二进制文件兼容。
¥The V8 flags and CPU features are compatible with that of the binary that generates the snapshot.
如果它们不匹配,Node.js 拒绝加载快照并以状态码 1 退出。
¥If they don't match, Node.js refuses to load the snapshot and exits with status code 1.