How the Defer Platform compiles your background functions.


The Defer Platform locates an application's background functions (How Defer works) to:

  • extract metadata (configuration of retries, concurrency, type of the function - CRON or not)
  • bundle it with its imports for later Executions

This page describes all the configurations linked to Defer Builds.



Configuration and defaults

Project root/This path is used to locate the tsconfig.json
Package ManagernpmWe automatically detect your package manager. We currently support NPM and Yarn. PNPM support is coming soon.
Pre-build commandNoneThis command is your own, e.g., generate Prisma type or any other task that must be done before running compilation.
Node Version18We currently only support LTS node version (16 or 18).
TypeScript version-Our Build pipeline uses the typescript version installed in your project. We support TypeScript in all 4.x versions.



Build lifecycle

Each new commit or update of an application's setting triggers a new build.

Each build is processed sequentially; we do not support auto-cancel builds yet.

1. Fetch

We fetch your project from GitHub with the environment configured branch.

Limitations: We currently don't support Git Submodules. Please reach us if you need to use them.


2. Install

We install your project dependencies using the detected package manager. Dependencies are installed with the exact versions found in the lockfile (no update).

Native dependencies are supported (ex: Prisma), as long as they work on Ubuntu.

Limitations: We currently don't support private packages.


3. Pre-build

A pre-build command can be configured for generated TypeScript types, ex: Prisma or GraphQL Code Generator.


4. Compile

We compile your background functions using the TypeScript Compiler API, supporting all TSConfig options, custom paths included.

We support the latest and upcoming TypeScript major versions (4.x, 5); however, we recommend your project to stay up to date with the latest stable version.


5. Publish

Once your background functions compiled and bundled, we archive them and store them, encrypted at rest.


Any build error will result in a notification - if configured (Alerting).

A build can take up to 30 minutes. After 30 minutes, the build timeout and result in a failed build. Contact us to extend the allowed build time if your project takes more than 30 minutes.



Reserved Environment variables

The following Environment variables are reserved and will be overrided if configured on the environment's settings.


NODE_ENV value is ignored during build.




What happens when a build fails?

A build failure triggers a notification on your Slack - if configured, and a notification on our side, so we can better assist you. If a Scheduled Function (CRON) was already defined in your project, a build failure wouldn't stop its schedule or update it.

How long do you keep the history of builds?

As answered in our Limits page, the retention of builds logs is of 7/30/90 days, depending on your plan.

Is there a limit to a build's log size?

As answered in our Limits page, the size of builds logs is limited to 200/1000/10000 Mo, depending on your plan.

Is there a limit to the build duration?

As answered in our Limits page, the duration of builds is limited to 30/60/600 min, depending on your plan.

Do you keep a copy of my project's code?

Our Build System temporarily downloads your code from GitHub, installs the dependencies, compiles and bundles your background functions, and stores them, encrypted at rest on our private servers (not accessible from the web). Only the code used in your background functions ends up being stored - for a limited time (Limits) - on our servers.