Repository navigation
Bun worker production #5163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bun worker production #5163
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "trigger.dev": patch | ||
| --- | ||
|
|
||
| Deployed Bun 1.4 tasks now see `NODE_ENV=production` when bytecode compilation is enabled. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1040,6 +1040,9 @@ export function bunCompileArgs( | |
| compiledRunWorker: NonNullable<GenerateContainerfileOptions["compiledRunWorker"]> | ||
| ) { | ||
| return [ | ||
| "env", | ||
| // Bun inlines process.env.NODE_ENV when compiling the deployed worker. | ||
| "NODE_ENV=production", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. π‘ Compiled tasks ignore configured environment mode
Learn moreA custom build layer can set environment variables for the image build, and parseGenerateOptions exposes those values to build commands. Before this change, Bun read that environment when compiling. The new command replaces Example: A staging deployment sets Recommended fix: Use production as the compiler default rather than replacing an explicit build value. Add a compiled-worker case with an explicit non-production value alongside the default-production case. If dashboard changes must take effect without a rebuild, verify a Bun setting or bundle transform that preserves runtime reads instead of folding them. Was this helpful? React with π or π to provide feedback. |
||
| "bun", | ||
| "build", | ||
| "--compile", | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π New executable requirement for custom images
bunCompileArgsnow requiresenvonPATH. The custom image requirements list BusyBox, which can provide the applet without exposing it as a standalone command.Was this helpful? React with π or π to provide feedback.