trigger.dev deploy (and during local builds).
Common use cases include:
- Installing system packages (e.g.
ffmpeg,chromium) into the deployment image - Running Prisma migrations or generating the Prisma client before deploy
- Copying additional files into the bundle
- Adding custom esbuild plugins
- Syncing environment variables from external services
Adding extensions
Extensions are added to thebuild.extensions array in your trigger.config.ts file.
Using built-in extensions
Install the@trigger.dev/build package as a dev dependency, then import the extensions you need:
trigger.config.ts
Writing a custom extension
If none of the built-in extensions meet your needs, you can define an extension inline as a plain object:trigger.config.ts
onBuildStart, onBuildComplete, externalsForTarget, and addLayer hooks that let you fully customize the build pipeline.
Built-in extensions
All built-in extensions are available in the@trigger.dev/build package.