Skip to content

fix: use --preload for Bun instead of --import#22

Merged
Lojhan merged 5 commits intomainfrom
fix/bun-preload-flag
Apr 22, 2026
Merged

fix: use --preload for Bun instead of --import#22
Lojhan merged 5 commits intomainfrom
fix/bun-preload-flag

Conversation

@Lojhan
Copy link
Copy Markdown
Collaborator

@Lojhan Lojhan commented Apr 22, 2026

Summary

  • Added test case for verifying Bun uses `--preload` flag
  • Aligns with @pokujs/dom fix

Details

This PR adds a test case that verifies the buildRunnerCommand function correctly handles Bun's CLI arguments. The actual fix is implemented in @pokujs/dom (the core package), which is imported by @pokujs/react.

Bun requires `--preload` as a positional argument (e.g., `--preload /path/to/file`) rather than `--import=/path/to/file` which is used for Node.js and Deno.

Test

Added test case verifying that `buildRunnerCommand` produces `--preload /tmp/react-dom-setup.ts` for Bun runtime.

Note: This fix depends on @pokujs/dom PR #16

- Added test case verifying buildRunnerCommand uses --preload for Bun
- Consistent with @pokujs/dom fix
@Lojhan Lojhan force-pushed the fix/bun-preload-flag branch 2 times, most recently from 2ea0417 to 0142688 Compare April 22, 2026 12:56
@Lojhan Lojhan force-pushed the fix/bun-preload-flag branch from cfca016 to 58c3b5d Compare April 22, 2026 13:03
@Lojhan Lojhan force-pushed the fix/bun-preload-flag branch from 70650c7 to 1f0b37b Compare April 22, 2026 13:11
@Lojhan Lojhan merged commit bd4a8dc into main Apr 22, 2026
12 checks passed
@Lojhan Lojhan deleted the fix/bun-preload-flag branch April 22, 2026 13:16
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.

1 participant