Back to Remotion

addBundleToSandbox()

packages/docs/docs/vercel/add-bundle-to-sandbox.mdx

4.0.4701.4 KB
Original Source

addBundleToSandbox()<AvailableFrom v="4.0.426" />

:::warning Experimental package: We reserve the right to make breaking changes in order to correct bad design decisions until this notice is gone. :::

Copies your Remotion bundle into a sandbox. Call this after createSandbox() to add your bundle files.

Example

ts
// @module: es2022
// @target: es2022
import {addBundleToSandbox, createSandbox} from '@remotion/vercel';
// ---cut---
const sandbox = await createSandbox();

await addBundleToSandbox({
  sandbox,
  bundleDir: '/path/to/bundle',
});

// ... use the sandbox

await sandbox.stop();

Arguments

An object with the following properties:

sandbox

A Sandbox instance, typically obtained from createSandbox().

bundleDir

The path to your Remotion bundle directory, relative to the current working directory.
A bundle can be created using the npx remotion bundle command, or using the bundle() API.

Return value

Promise<void> — resolves when the bundle has been copied into the sandbox.

See also