@@ -14,7 +14,7 @@ import { defineConfig } from "@trigger.dev/sdk/v3";
14
14
15
15
export default defineConfig ({
16
16
// Your project ref (you can see it on the Project settings page in the dashboard)
17
- project: " proj_gtcwttqhhtlasxgfuhxs " ,
17
+ project: " <project ref> " ,
18
18
// The paths for your trigger folders
19
19
dirs: [" ./trigger" ],
20
20
retries: {
@@ -55,7 +55,8 @@ You can add lifecycle functions to get notified when any task starts, succeeds,
55
55
import { defineConfig } from " @trigger.dev/sdk/v3" ;
56
56
57
57
export default defineConfig ({
58
- // ..other stuff
58
+ project: " <project ref>" ,
59
+ // Your other config settings...
59
60
onSuccess : async (payload , output , { ctx }) => {
60
61
console .log (" Task succeeded" , ctx .task .id );
61
62
},
@@ -87,7 +88,8 @@ import { PrismaInstrumentation } from "@prisma/instrumentation";
87
88
import { OpenAIInstrumentation } from " @traceloop/instrumentation-openai" ;
88
89
89
90
export default defineConfig ({
90
- // ..other stuff
91
+ project: " <project ref>" ,
92
+ // Your other config settings...
91
93
instrumentations: [new PrismaInstrumentation (), new OpenAIInstrumentation ()],
92
94
});
93
95
```
@@ -115,7 +117,8 @@ We currently only officially support the `node` runtime, but you can try our exp
115
117
import { defineConfig } from " @trigger.dev/sdk/v3" ;
116
118
117
119
export default defineConfig ({
118
- // ..other stuff
120
+ project: " <project ref>" ,
121
+ // Your other config settings...
119
122
runtime: " bun" ,
120
123
});
121
124
```
@@ -130,7 +133,8 @@ You can specify the default machine for all tasks in your project:
130
133
import { defineConfig } from " @trigger.dev/sdk/v3" ;
131
134
132
135
export default defineConfig ({
133
- // ..other stuff
136
+ project: " <project ref>" ,
137
+ // Your other config settings...
134
138
defaultMachine: " large-1x" ,
135
139
});
136
140
```
@@ -145,7 +149,8 @@ You can set the log level for your project:
145
149
import { defineConfig } from " @trigger.dev/sdk/v3" ;
146
150
147
151
export default defineConfig ({
148
- // ..other stuff
152
+ project: " <project ref>" ,
153
+ // Your other config settings...
149
154
logLevel: " debug" ,
150
155
});
151
156
```
@@ -160,7 +165,8 @@ You can set the default `maxDuration` for all tasks in your project:
160
165
import { defineConfig } from " @trigger.dev/sdk/v3" ;
161
166
162
167
export default defineConfig ({
163
- // ..other stuff
168
+ project: " <project ref>" ,
169
+ // Your other config settings...
164
170
maxDuration: 60 , // 60 seconds
165
171
});
166
172
```
@@ -175,7 +181,8 @@ You can customize the build process using the `build` option:
175
181
import { defineConfig } from " @trigger.dev/sdk/v3" ;
176
182
177
183
export default defineConfig ({
178
- // ..other stuff
184
+ project: " <project ref>" ,
185
+ // Your other config settings...
179
186
build: {
180
187
// Don't bundle these packages
181
188
external: [" header-generator" ],
@@ -197,7 +204,8 @@ All code is bundled by default, but you can exclude some packages from the bundl
197
204
import { defineConfig } from " @trigger.dev/sdk/v3" ;
198
205
199
206
export default defineConfig ({
200
- // ..other stuff
207
+ project: " <project ref>" ,
208
+ // Your other config settings...
201
209
build: {
202
210
external: [" header-generator" ],
203
211
},
@@ -212,7 +220,8 @@ Each entry in the external should be a package name, not necessarily the import
212
220
import { defineConfig } from " @trigger.dev/sdk/v3" ;
213
221
214
222
export default defineConfig ({
215
- // ..other stuff
223
+ project: " <project ref>" ,
224
+ // Your other config settings...
216
225
build: {
217
226
external: [" ai" ],
218
227
},
@@ -232,7 +241,8 @@ You can customize the `jsx` options that are passed to `esbuild` using the `jsx`
232
241
import { defineConfig } from " @trigger.dev/sdk/v3" ;
233
242
234
243
export default defineConfig ({
235
- // ..other stuff
244
+ project: " <project ref>" ,
245
+ // Your other config settings...
236
246
build: {
237
247
jsx: {
238
248
// Use the Fragment component instead of React.Fragment
@@ -258,7 +268,8 @@ You can add custom [import conditions](https://esbuild.github.io/api/#conditions
258
268
import { defineConfig } from " @trigger.dev/sdk/v3" ;
259
269
260
270
export default defineConfig ({
261
- // ..other stuff
271
+ project: " <project ref>" ,
272
+ // Your other config settings...
262
273
build: {
263
274
conditions: [" react-server" ],
264
275
},
@@ -282,7 +293,8 @@ import { defineConfig } from "@trigger.dev/sdk/v3";
282
293
import { additionalFiles } from " @trigger.dev/build/extensions/core" ;
283
294
284
295
export default defineConfig ({
285
- // ..other stuff
296
+ project: " <project ref>" ,
297
+ // Your other config settings...
286
298
build: {
287
299
extensions: [
288
300
additionalFiles ({ files: [" wrangler/wrangler.toml" , " ./assets/**" , " ./fonts/**" ] }),
@@ -304,7 +316,8 @@ import { defineConfig } from "@trigger.dev/sdk/v3";
304
316
import { additionalPackages } from " @trigger.dev/build/extensions/core" ;
305
317
306
318
export default defineConfig ({
307
- // ..other stuff
319
+ project: " <project ref>" ,
320
+ // Your other config settings...
308
321
build: {
309
322
extensions: [additionalPackages ({ packages: [" wrangler" ] })],
310
323
},
@@ -317,7 +330,8 @@ This allows you to include additional packages in the build that are not automat
317
330
import { defineConfig } from " @trigger.dev/sdk/v3" ;
318
331
319
332
export default defineConfig ({
320
- // ..other stuff
333
+ project: " <project ref>" ,
334
+ // Your other config settings...
321
335
build: {
322
336
extensions: [
additionalPackages ({ packages: [
" [email protected] " ] })],
323
337
},
@@ -334,6 +348,7 @@ import { emitDecoratorMetadata } from "@trigger.dev/build/extensions/typescript"
334
348
335
349
export default defineConfig ({
336
350
project: " <project ref>" ,
351
+ // Your other config settings...
337
352
build: {
338
353
extensions: [emitDecoratorMetadata ()],
339
354
},
@@ -365,6 +380,8 @@ import { defineConfig } from "@trigger.dev/sdk/v3";
365
380
import { prismaExtension } from " @trigger.dev/build/extensions/prisma" ;
366
381
367
382
export default defineConfig ({
383
+ project: " <project ref>" ,
384
+ // Your other config settings...
368
385
build: {
369
386
extensions: [
370
387
prismaExtension ({
@@ -389,6 +406,7 @@ import { prismaExtension } from "@trigger.dev/build/extensions/prisma";
389
406
390
407
export default defineConfig ({
391
408
project: " <project ref>" ,
409
+ // Your other config settings...
392
410
build: {
393
411
extensions: [
394
412
prismaExtension ({
@@ -431,6 +449,7 @@ import { prismaExtension } from "@trigger.dev/build/extensions/prisma";
431
449
432
450
export default defineConfig ({
433
451
project: " <project ref>" ,
452
+ // Your other config settings...
434
453
build: {
435
454
extensions: [
436
455
prismaExtension ({
@@ -451,6 +470,7 @@ import { defineConfig } from "@trigger.dev/sdk/v3";
451
470
452
471
export default defineConfig ({
453
472
project: " <project ref>" ,
473
+ // Your other config settings...
454
474
build: {
455
475
extensions: [
456
476
prismaExtension ({
@@ -471,7 +491,36 @@ These environment variables are only used during the build process and are not e
471
491
472
492
#### syncEnvVars
473
493
474
- The ` syncEnvVars ` build extension replaces the deprecated ` resolveEnvVars ` export. Check out our [ syncEnvVars documentation] ( /deploy-environment-variables#sync-env-vars-from-another-service ) for more information and example usage (including syncing environment variables from Infisical and Vercel).
494
+ The ` syncEnvVars ` build extension replaces the deprecated ` resolveEnvVars ` export.
495
+
496
+ ``` ts
497
+ import { syncEnvVars } from " @trigger.dev/build/extensions/core" ;
498
+
499
+ export default defineConfig ({
500
+ project: " <project ref>" ,
501
+ // Your other config settings...
502
+ build: {
503
+ extensions: [syncEnvVars ()],
504
+ },
505
+ });
506
+ ```
507
+
508
+ #### vercelSyncEnvVars
509
+
510
+ The ` vercelSyncEnvVars ` build extension syncs environment variables from your Vercel project to Trigger.dev.
511
+
512
+ ``` ts
513
+ import { defineConfig } from " @trigger.dev/sdk/v3" ;
514
+ import { vercelSyncEnvVars } from " @trigger.dev/build/extensions/vercelSyncEnvVars" ;
515
+
516
+ export default defineConfig ({
517
+ project: " <project ref>" ,
518
+ // Your other config settings...
519
+ build: {
520
+ extensions: [vercelSyncEnvVars ()],
521
+ },
522
+ });
523
+ ```
475
524
476
525
#### audioWaveform
477
526
@@ -482,7 +531,8 @@ import { defineConfig } from "@trigger.dev/sdk/v3";
482
531
import { audioWaveform } from " @trigger.dev/build/extensions/audioWaveform" ;
483
532
484
533
export default defineConfig ({
485
- // ..other stuff
534
+ project: " <project ref>" ,
535
+ // Your other config settings...
486
536
build: {
487
537
extensions: [audioWaveform ()], // uses verson 1.1.0 of audiowaveform by default
488
538
},
@@ -525,6 +575,7 @@ import { defineConfig } from "@trigger.dev/sdk/v3";
525
575
import { ffmpeg } from " @trigger.dev/build/extensions/core" ;
526
576
527
577
export default defineConfig ({
578
+ project: " <project ref>" ,
528
579
// Your other config settings...
529
580
build: {
530
581
extensions: [ffmpeg ()],
@@ -539,7 +590,8 @@ import { defineConfig } from "@trigger.dev/sdk/v3";
539
590
import { ffmpeg } from " @trigger.dev/build/extensions/core" ;
540
591
541
592
export default defineConfig ({
542
- // ..other stuff
593
+ project: " <project ref>" ,
594
+ // Your other config settings...
543
595
build: {
544
596
extensions: [ffmpeg ({ version: " 6.0-4" })],
545
597
},
@@ -561,6 +613,7 @@ import { sentryEsbuildPlugin } from "@sentry/esbuild-plugin";
561
613
562
614
export default defineConfig ({
563
615
project: " <project ref>" ,
616
+ // Your other config settings...
564
617
build: {
565
618
extensions: [
566
619
esbuildPlugin (
@@ -586,7 +639,8 @@ import { defineConfig } from "@trigger.dev/sdk/v3";
586
639
import { aptGet } from " @trigger.dev/build/extensions/core" ;
587
640
588
641
export default defineConfig ({
589
- // ..other stuff
642
+ project: " <project ref>" ,
643
+ // Your other config settings...
590
644
build: {
591
645
extensions: [aptGet ({ packages: [" ffmpeg" ] })],
592
646
},
@@ -599,7 +653,8 @@ If you want to install a specific version of a package, you can specify the vers
599
653
import { defineConfig } from " @trigger.dev/sdk/v3" ;
600
654
601
655
export default defineConfig ({
602
- // ..other stuff
656
+ project: " <project ref>" ,
657
+ // Your other config settings...
603
658
build: {
604
659
extensions: [aptGet ({ packages: [" ffmpeg=6.0-4" ] })],
605
660
},
@@ -646,7 +701,8 @@ Instead of creating this function and worrying about types, you can define an ex
646
701
import { defineConfig } from " @trigger.dev/sdk/v3" ;
647
702
648
703
export default defineConfig ({
649
- // ..other stuff
704
+ project: " <project ref>" ,
705
+ // Your other config settings...
650
706
build: {
651
707
extensions: [
652
708
{
0 commit comments