property

CompileBuildOptions.aot

aot?: boolean

Compile the program's JavaScript and TypeScript to machine code at build time. It cannot be combined with bytecode.

The executable has no JIT. Code that only exists at run time, such as a string passed to eval() or new Function(), runs in the interpreter.

Built-in objects such as Object.prototype, Array.prototype and Promise are read-only in the executable. Assigning to one throws a TypeError. Breakpoints aren't available.

Requires a target that matches the platform and Bun version running the build. format has no effect: each file keeps the module format it is written in.

Equivalent CLI flag: --aot