robobun
23383b32b0
feat(compile): add --compile-autoload-tsconfig and --compile-autoload-package-json flags ( #25340 )
...
## 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 >
2025-12-05 14:43:53 -08:00
..
2025-11-10 14:38:26 -08:00
2025-07-22 17:51:38 -07:00
2025-11-17 15:04:42 -05:00
2025-11-10 14:38:26 -08:00
2025-11-18 10:49:21 -08:00
2025-12-05 11:19:47 -08:00
2025-07-22 17:51:38 -07:00
2025-12-05 14:43:53 -08:00
2025-12-05 14:43:53 -08:00
2025-12-05 14:43:53 -08:00
2025-11-24 23:34:16 -08:00
2025-11-19 21:20:55 -08:00
2025-11-10 14:38:26 -08:00
2025-11-18 14:02:21 -08:00
2025-12-01 21:59:11 -08:00
2025-11-10 14:38:26 -08:00
2025-07-22 17:51:38 -07:00
2025-11-23 01:41:17 -08:00
2025-11-26 15:11:45 -08:00
2025-12-01 21:05:47 -08:00
2025-12-01 21:59:11 -08:00
2025-11-19 21:20:55 -08:00
2025-12-01 21:59:11 -08:00
2025-12-01 17:31:15 -08:00
2025-07-21 13:26:47 -07:00
2025-11-10 14:38:26 -08:00
2025-10-03 17:10:28 -07:00
2025-11-17 11:23:13 -08:00
2025-11-24 20:16:03 -08:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-12-05 14:43:53 -08:00
2025-11-18 14:02:21 -08:00
2025-11-10 14:38:26 -08:00
2025-11-20 20:56:02 -08:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-12-01 21:59:11 -08:00
2025-11-15 16:36:15 -08:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-12-01 21:59:11 -08:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-10-04 02:17:55 -07:00
2025-10-31 19:50:55 -07:00
2025-11-26 00:02:43 -08:00
2025-11-05 15:28:28 -08:00
2025-07-29 19:35:46 -07:00
2025-11-10 14:38:26 -08:00
2025-07-22 17:51:38 -07:00
2025-10-23 23:08:08 -07:00
2025-07-22 17:51:38 -07:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-07-20 23:04:17 -07:00
2025-12-05 14:43:53 -08:00
2025-12-01 21:59:11 -08:00
2025-11-25 11:06:24 -08:00
2025-11-10 14:38:26 -08:00
2025-11-10 19:58:02 -08:00
2025-10-24 23:42:20 -07:00
2025-12-05 14:43:53 -08:00
2025-09-26 15:19:45 -07:00
2025-11-18 10:49:21 -08:00
2025-10-29 19:29:04 -07:00
2025-11-03 22:20:07 -08:00
2025-11-10 14:38:26 -08:00
2025-11-20 20:56:02 -08:00
2025-11-20 20:56:02 -08:00
2025-07-21 13:26:47 -07:00
2025-09-26 22:21:00 -07:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-07-21 13:26:47 -07:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-11-10 19:58:02 -08:00
2025-11-20 23:37:31 -08:00
2025-11-10 14:38:26 -08:00
2025-11-18 10:49:21 -08:00
2025-10-23 23:08:08 -07:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-08-23 06:55:30 -07:00
2025-10-04 00:31:47 -07:00
2025-11-10 14:38:26 -08:00
2025-10-02 14:11:29 -07:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-07-22 17:51:38 -07:00
2025-09-09 20:41:10 -07:00
2025-12-01 17:31:15 -08:00
2025-10-14 20:51:34 -07:00
2025-11-10 14:38:26 -08:00
2025-08-23 06:55:30 -07:00
2025-07-22 17:51:38 -07:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-11-15 16:36:15 -08:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-10-23 23:08:08 -07:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-10-18 18:14:01 -07:00
2025-11-10 14:38:26 -08:00
2025-07-22 17:51:38 -07:00
2025-09-14 04:14:48 -07:00
2025-12-05 14:43:53 -08:00
2025-11-30 23:11:33 -08:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-09-30 00:10:15 -07:00
2025-11-10 14:38:26 -08:00
2025-12-01 21:59:11 -08:00
2025-11-10 14:38:26 -08:00
2025-11-13 19:29:16 -08:00
2025-09-26 15:15:58 -07:00
2025-11-10 14:38:26 -08:00
2025-11-15 16:36:15 -08:00
2025-09-26 22:21:00 -07:00
2025-11-10 14:38:26 -08:00
2025-09-03 15:40:44 -07:00
2025-09-22 19:28:26 -07:00
2025-07-21 13:26:47 -07:00
2025-11-10 14:38:26 -08:00
2025-12-05 14:43:53 -08:00
2025-11-10 14:38:26 -08:00
2025-11-28 22:56:28 -08:00
2025-07-13 04:27:43 -07:00
2025-07-13 04:27:43 -07:00
2025-07-13 04:27:43 -07:00
2025-11-10 14:38:26 -08:00
2025-11-18 10:49:21 -08:00
2025-07-21 13:26:47 -07:00
2025-09-03 15:40:44 -07:00
2025-07-25 12:38:06 -07:00
2025-11-10 14:38:26 -08:00
2025-11-17 15:04:42 -05:00
2025-10-03 17:10:28 -07:00
2025-07-21 13:26:47 -07:00
2025-11-26 13:46:08 -08:00
2025-07-21 13:26:47 -07:00
2025-11-10 14:38:26 -08:00
2025-11-18 10:49:21 -08:00
2025-07-22 17:51:38 -07:00
2025-08-11 20:19:34 -07:00
2025-07-20 23:04:17 -07:00
2025-11-30 23:11:33 -08:00
2025-07-21 13:26:47 -07:00
2025-11-10 14:38:26 -08:00
2025-07-21 13:26:47 -07:00
2025-11-10 14:38:26 -08:00