Skip to main content

addBundleToSandbox()v4.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​

create-snapshot.ts
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.

Compatibility​

ServersEnvironments
Node.js
Bun
Serverless Functions
Local bundle required

The bundle directory must be available in the filesystem of the calling server or serverless function.

See also​