1.1.5 • Published 11 months ago

@nurodev/astro-bun v1.1.5

Weekly downloads
-
License
MIT
Repository
-
Last release
11 months ago

astro-bun

This adapter allows Astro to deploy your SSR site to Bun targets.

Features

All functionality offered in astro-bun-adapter is also available in this project, along with some additional features:

  • Hybrid Output Support: You can now use "output": "hybrid" in your astro.config.mjs to output both static and server-rendered pages.
  • Improved server URL logging: The URL printed to the console when the server is started now shows the full URL rather than just the port.
  • Process exit & shutdown handlers: Added support for process.on handlers for when the server exists, or intercepts SIGINT and SIGTERM signals.

Usage

Installation

  1. Install the required dependencies
bun add @nurodev/astro-bun
  1. Add the integration to your astro config
+import bun from "@nurodev/astro-bun";

export default defineConfig({
+ 	adapter: bun(),
+ 	output: "hybrid",
});
  1. Update your package.json start script
{
	"scripts": {
-		"start": "astro dev"
+		"start": "bun run ./dist/server/entry.mjs"
	}
}

Contributing

This package is structured as a monorepo:

  • playground contains code for testing the package
  • package contains the actual package

Install dependencies using pnpm:

bun i --frozen-lockfile

Start the playground and package watcher:

bun dev

You can now edit files in package. Please note that making changes to those files may require restarting the playground dev server.

Licensing

MIT Licensed. Made with ❤️ by Ben Dixon.

Credits

  • @ido-pluto, and subsequently @andremralves: This project is massively based on astro-bun-adapter on but with some improvements added.
  • @florian-lefebvre: The structure & a lot of copy text is based on their astro-integration-template project template.
1.1.5

11 months ago

1.1.4

11 months ago

1.1.3

11 months ago

1.1.2

12 months ago

1.1.1

12 months ago

0.1.3

12 months ago

0.1.2

12 months ago

0.1.1

12 months ago