Skip to content

Comments

feat: support additional bun compile args and --bytecode compatibility#19

Open
ramonmalcolm10 wants to merge 1 commit intoHugo-Dz:mainfrom
ramonmalcolm10:feat/bun-compile-args
Open

feat: support additional bun compile args and --bytecode compatibility#19
ramonmalcolm10 wants to merge 1 commit intoHugo-Dz:mainfrom
ramonmalcolm10:feat/bun-compile-args

Conversation

@ramonmalcolm10
Copy link

Closes #18

Summary

  • All packages (sveltekit, nuxt, tanstack): Add a bunArgs option for passing extra flags to bun build --compile (e.g. --minify, --sourcemap, --bytecode)
  • sveltekit: Wrap server entry in async IIFE to eliminate top-level await, required for --bytecode support
  • sveltekit: Fix duplicate shutdown logs by adding a guard to gracefulShutdown

Usage

// svelte.config.js
adapter({
  bunArgs: ["--minify", "--sourcemap", "--bytecode"]
})

Test plan

  • Built sveltekit app with bunArgs: ["--minify", "--sourcemap", "--bytecode"] — compiles successfully
  • Verified binary starts and serves static assets correctly
  • Verified Ctrl+C prints shutdown message only once

🤖 Generated with Claude Code

- Add `bunArgs` option to all three packages (sveltekit, nuxt, tanstack)
  for passing extra flags to `bun build --compile`
- Wrap sveltekit server entry in async IIFE to eliminate top-level await,
  required for --bytecode support
- Fix duplicate shutdown log by adding a guard to gracefulShutdown

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: support additional bun compile args and --bytecode compatibility

1 participant