@@ -75,6 +75,20 @@ export default defineConfig({
7575});
7676```
7777
78+ ## Custom tsconfig path
79+
80+ You can specify a custom path to your tsconfig file. This is useful if you have a custom tsconfig file that you want to use.
81+
82+ ``` ts trigger.config.ts
83+ import { defineConfig } from " @trigger.dev/sdk" ;
84+
85+ export default defineConfig ({
86+ project: " <project ref>" ,
87+ dirs: [" ./trigger" ],
88+ tsconfig: " ./custom-tsconfig.json" , // Custom tsconfig path
89+ });
90+ ```
91+
7892## Lifecycle functions
7993
8094You can add lifecycle functions to get notified when any task starts, succeeds, or fails using ` onStart ` , ` onSuccess ` and ` onFailure ` :
@@ -277,6 +291,21 @@ export default defineConfig({
277291
278292The ` logLevel ` only determines which logs are sent to the Trigger.dev instance when using the ` logger ` API. All ` console ` based logs are always sent.
279293
294+ ## Console logging
295+
296+ You can control console logging behavior in development:
297+
298+ ``` ts trigger.config.ts
299+ import { defineConfig } from " @trigger.dev/sdk" ;
300+
301+ export default defineConfig ({
302+ project: " <project ref>" ,
303+ // Your other config settings...
304+ enableConsoleLogging: true , // Enable console logging while running dev CLI
305+ disableConsoleInterceptor: false , // Disable console interceptor (prevents logs from being sent to the trigger.dev dashboard)
306+ });
307+ ```
308+
280309## Max duration
281310
282311You can set the default ` maxDuration ` for all tasks in your project:
@@ -293,6 +322,71 @@ export default defineConfig({
293322
294323See our [ maxDuration guide] ( /runs/max-duration ) for more information.
295324
325+ ## Process keep alive
326+
327+ Keep the process alive after the task has finished running so the next task doesn't have to wait for the process to start up again.
328+
329+ Note that the process could be killed at any time, and we don't make any guarantees about the process being alive for a certain amount of time
330+
331+ ``` ts trigger.config.ts
332+ import { defineConfig } from " @trigger.dev/sdk" ;
333+
334+ export default defineConfig ({
335+ project: " <project ref>" ,
336+ // Your other config settings...
337+ processKeepAlive: true ,
338+ });
339+ ```
340+
341+ You can pass an object to the ` processKeepAlive ` option to configure the behavior:
342+
343+ ``` ts trigger.config.ts
344+ import { defineConfig } from " @trigger.dev/sdk" ;
345+
346+ export default defineConfig ({
347+ project: " <project ref>" ,
348+ // Your other config settings...
349+ processKeepAlive: {
350+ enabled: true ,
351+ // The maximum number of executions per process. If the process has run more than this number of times, it will be killed.
352+ maxExecutionsPerProcess: 50 , // Default: 50
353+ // The maximum number of concurrent processes to keep alive in dev.
354+ devMaxPoolSize: 25 , // Default: 25
355+ },
356+ });
357+ ```
358+
359+ ## Development behavior
360+
361+ You can control the working directory behavior in development:
362+
363+ ``` ts trigger.config.ts
364+ import { defineConfig } from " @trigger.dev/sdk" ;
365+
366+ export default defineConfig ({
367+ project: " <project ref>" ,
368+ // Your other config settings...
369+ legacyDevProcessCwdBehaviour: false , // Default: true
370+ });
371+ ```
372+
373+ When set to ` false ` , the current working directory will be set to the build directory, which more closely matches production behavior.
374+
375+ ## CA certificates
376+
377+ CA Cert file to be added to NODE_EXTRA_CA_CERT environment variable, useful in use with self signed cert in the trigger.dev environment.
378+
379+ ``` ts trigger.config.ts
380+ import { defineConfig } from " @trigger.dev/sdk" ;
381+
382+ export default defineConfig ({
383+ project: " <project ref>" ,
384+ // Your other config settings...
385+ // Must start with "./" and be relative to project root
386+ extraCACerts: " ./certs/ca.crt" ,
387+ });
388+ ```
389+
296390## Build configuration
297391
298392You can customize the build process using the ` build ` option:
@@ -306,6 +400,12 @@ export default defineConfig({
306400 build: {
307401 // Don't bundle these packages
308402 external: [" header-generator" ],
403+ // Automatically detect external dependencies (default: true)
404+ autoDetectExternal: true ,
405+ // Keep function/class names in bundle (default: true)
406+ keepNames: true ,
407+ // Minify generated code (default: false, experimental)
408+ minify: false ,
309409 },
310410});
311411```
0 commit comments