mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 10:28:47 +00:00
## Summary By default, standalone executables no longer load `tsconfig.json` and `package.json` at runtime. This improves startup performance and prevents unexpected behavior from config files in the runtime environment. - Added `--compile-autoload-tsconfig` / `--no-compile-autoload-tsconfig` CLI flags (default: false) - Added `--compile-autoload-package-json` / `--no-compile-autoload-package-json` CLI flags (default: false) - Added `autoloadTsconfig` and `autoloadPackageJson` options to the `Bun.build()` compile config - Flags are stored in `StandaloneModuleGraph.Flags` and applied at runtime boot This follows the same pattern as the existing `--compile-autoload-dotenv` and `--compile-autoload-bunfig` flags. ## Test plan - [x] Added tests in `test/bundler/bundler_compile_autoload.test.ts` - [x] Verified standalone executables work correctly with runtime config files that differ from compile-time configs - [x] Verified the new CLI flags are properly parsed and applied - [x] Verified the JS API options work correctly 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Bot <claude-bot@bun.sh> Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>