Skip to content

Commit

Permalink
add Range headers support for static files
Browse files Browse the repository at this point in the history
  • Loading branch information
gornostay25 committed Jul 12, 2022
1 parent de25556 commit 3c218a4
Show file tree
Hide file tree
Showing 7 changed files with 328 additions and 274 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

[Adapter](https://kit.svelte.dev/docs/adapters) for SvelteKit apps that generates a standalone [Bun](https://github.com/oven-sh/bun) server.

> **Warning**
> **This is experimental module!** Bun does not support many things like [`FormData`](https://github.com/oven-sh/bun/issues/621)
> So I can't promise it will work
## Usage

Install with `bun add -d svelte-adapter-bun` or `npm i -D svelte-adapter-bun`, then add the adapter to your `svelte.config.js`:
Expand Down Expand Up @@ -62,6 +66,8 @@ The directory to build the server to. It defaults to `build` — i.e. `bun run s

Browse a static assets. Default: `true`

- [X] Support [HTTP range requests](https://developer.mozilla.org/en-US/docs/Web/HTTP/Range_requests)

### precompress

Enables precompressing using gzip and brotli for assets and prerendered pages. It defaults to `false`.
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export default function (opts = {}) {
JSON.stringify(package_data, null, "\t")
);

builder.log.success("Start server with: bun /build/index.js")
builder.log.success("Start server with: bun ./build/index.js")
}
};
}
Expand Down
Loading

0 comments on commit 3c218a4

Please sign in to comment.