Skip to content

Question: What is the recommended way to apply instrumentation for single-file executables for Bun? #19339

@aldy505

Description

@aldy505

Description

I was reading the documentation, and came across the command of bun --preload ./instrument.js app.js.

I'm currently vibe-coding a full-stack app (or for simplicity, let's just say a backend app) and I plan to bundle it using Bun's single file executable feature. However, I can't find a clean way to replicate the --preload flag's behavior within a bundled executable.

Is this unsupported, or is there a recommended way to apply instrumentation similar to the --preload ./instrument.js when bundling?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions