Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions src/content/docs/en/recipes/bun.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,25 @@ bun run build

When the build is finished, run the appropriate preview command (e.g. `bun run preview`) in your terminal and you can view the built version of your site locally in the same browser preview window.

### Runtime

By default, Bun will run the Astro dev server with Node.js.
To force the Bun runtime, pass the `--bun` flag, for example:

```bash
bun --bun run dev
```

This also applies to other `bun run` commands, such as `bun run build` and `bun run preview`.

As an alternative, you can configure this once in the `bunfig.toml` file in your project root:

```toml
[run]
# equivalent to `bun --bun` for all `bun run` commands
bun = true
```

## Testing

Bun ships with a fast, built-in, Jest-compatible test runner through the [`bun test` command](https://bun.sh/docs/cli/test). You can also use any other [testing tools for Astro](/en/guides/testing/).
Expand Down
Loading