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.
| Extension | Import path | Description |
|---|---|---|
prismaExtension | @trigger.dev/build/extensions/prisma | Generate the Prisma client and include it in your deployment. Supports multiple schemas and engine types. |
pythonExtension | @trigger.dev/python/extension | Execute Python scripts from your tasks. Installs Python and your requirements into the image. |
playwright | @trigger.dev/build/extensions/playwright | Run Playwright browsers in your tasks with full browser support. |
puppeteer | @trigger.dev/build/extensions/puppeteer | Run Puppeteer in your tasks. Installs a compatible Chromium browser into the deployment image. |
lightpanda | @trigger.dev/build/extensions/lightpanda | Ultra-fast, low-memory headless browser optimized for scraping. |
ffmpeg | @trigger.dev/build/extensions/core | Install the FFmpeg binary for audio and video processing. |
aptGet | @trigger.dev/build/extensions/core | Install arbitrary system packages using apt-get during the image build. |
additionalFiles | @trigger.dev/build/extensions/core | Copy additional files from your project into the deployment bundle. |
additionalPackages | @trigger.dev/build/extensions/core | Install additional npm packages that aren’t part of your project’s package.json. |
syncEnvVars | @trigger.dev/build/extensions/core | Sync environment variables from Vercel or Supabase at deploy time. |
esbuildPlugin | @trigger.dev/build/extensions/core | Add existing or custom esbuild plugins to your build pipeline. |
emitDecoratorMetadata | @trigger.dev/build/extensions/core | Enable emitDecoratorMetadata for TypeScript decorator support (TypeORM, NestJS). |
audioWaveform | @trigger.dev/build/extensions/core | Install the audiowaveform binary for generating waveform data. |