npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@beesolve/lambda-bun-sveltekit-adapter

v0.2.2

Published

A SvelteKit adapter for Bun on Lambda

Readme

SvelteKit adapter for Bun on Lambda

This adapter bundles your SvelteKit so it could be run on Lambda with Bun.

The adapter also exposes CDK construct which helps you to deploy your SvelteKit application.

Usage

In this section you will be walked through steps to use SvelteKit adapter and deploy it to AWS Lambda with Bun runtime.

Installation

bun i @beesolve/lambda-bun-sveltekit-adapter aws-cdk aws-cdk-lib constructs

svelte.config.js setup

import adapter from '@beesolve/lambda-bun-sveltekit-adapter';
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';

const originUrl = 'https://{distributionId}.cloudfront.net'

/** @type {import('@sveltejs/kit').Config} */
const config = {
  preprocess: vitePreprocess(),

  kit: {
    adapter: adapter(),
    paths: {
      assets: originUrl,
    },
    csrf: {
      trustedOrigins: [originUrl],
    },
  },
};

export default config;

[!NOTE] It is important to set origin to kit.paths.assets and kit.csrf.trustedOrigins.

CDK deployment

Below you can see the minimum CDK configuraiton which will deploy your SvelteKit application to AWS Lambda behind CloudFront. You can pass various options to SvelteKit construct.

// app.ts
import { SvelteKit } from '@beesolve/lambda-bun-sveltekit-adapter/cdk';
import { App, Stack, type Environment } from 'aws-cdk-lib';

const env: Environment = {
  account: 'your-account-id',
  region: 'your-prefered-region',
};

const app = new App();
const stack = new Stack(app, 'YourSite', { env });

const { handler, distribution } = new SvelteKit(stack, 'SvelteKit');

// here you can add permissions to `handler` function etc

We recommend to put above code to app.ts in the root of your repository. Then we recommed to add following to your packages.json:

{
  // ...
  "scripts": {
    "dev": "bun run --bun --env-file=./.env vite dev",
    "build": "bunx --bun vite build",
    "cdk": "cdk --app \"bun app.ts\" --profile {your-aws-profile}",
    // ...
  }
  // ...
}

Once you have changed your package.json you will be able to build your SvelteKit application and deploy it to AWS:

bun run build
bun run cdk bootstrap # only needed for the first time
bun run cdk deploy