createSnapshot()v4.0.425
Takes a snapshot of a sandbox. Snapshots allow you to skip the sandbox setup time in production by restoring from a pre-built state.
Typically called during the build step (e.g. in create-snapshot.ts) to cache the sandbox for production use.
Example
const {snapshotId } = await createSnapshot ({sandbox });
console .log (`Snapshot created: ${snapshotId }`);Arguments
An object with the following properties:
sandbox
A VercelSandbox instance, typically obtained from createSandbox().
Return value
An object containing:
snapshotId
A string identifier for the snapshot. Pass this to saveSnapshot() to cache it for production use.