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

sveltekit-adapter-custom

v1.0.0-alpha.5

Published

`sveltekit-adapter-custom` is the openest SvelteKit adapter in town.

Readme

sveltekit-adapter-custom · GitHub license

sveltekit-adapter-custom is the openest SvelteKit adapter in town.

📖 Table of Contents

📢 IMPORTANT NOTICE

This adapter heavily modifies SvelteKit's internal workings and build process also it's still in alpha.

Because of the way this package achives it's goals and the maintainers of SvelteKit disagreeing with the idea of an open node framework (Reference). We need to do a fair amount of modifications to the internal workings of SvelteKit, especially to the build process in order to make this package work.

Therefore it's extremly likely that new releases of SvelteKit (especially major releases) will not directly work with it. We try to update the adapter ASAP when breaking changes arrive in SvelteKit. Still it's more than possible that this adapter isn't directly compatible with the newest SvelteKit version. Especially shortly after an SvelteKit update.

Also another important part is that this adapter package is currently in alpha. We are still continuously adding new features, improving existing ones, as well as introducing breaking changes. We try to keep the amount of breaking changes as low as possible but it's likely that even not major releases will still introduce some.

That said when you still want to test out the adapter we highly recommend you, for the time being, to pin your SvelteKit version as well as the version of this adapter package.

👋 Introduction

sveltekit-adapter-custom is a SvelteKit adapter based on the @sveltejs/adapter-node build because of a strong disagree with the maintainers of adapter-node (Refer to motivation). It's goal is to be a drop in replacement for users which want to customize the underlying server to their liking. In order to achive this it gives it's users access to a wide variety of custom options and custom hooks.

🎩 Acknowledgements

A big shoutout to @dmoebius which wrote a beautiful comment on injecting custom code into all three environments of SvelteKit's workflow (dev, preview and production).

And a big shoutout to @carlosV2 which released an awesome SvelteKit adapter to inject a ws websocket server into SvelteKit.

📖 Docs

NOTICE: The documentation is currently not complete.

For more information refer to the original adapter-node Documentation. Which is mostly valid for this adapter too.

📦 Getting Started

Simply run npm i -D sveltekit-adapter-custom@alpha, change the adapter in your svelte.config.js:

// svelte.config.js
import adapter from 'sveltekit-adapter-custom';

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

export default config;

install the vite plugin to your vite.config.js

// vite.config.js
import { sveltekit } from '@sveltejs/kit/vite';
import svelteKitCustom from 'sveltekit-adapter-custom/plugin';
import { defineConfig } from 'vite';

export default defineConfig({
    // ...
    plugins: [sveltekit(), svelteKitCustom()],
});

and add the provided hooks to your hooks.server.js file:

// hooks.server.js
// ...
/** @type {import('sveltekit-adapter-custom').SetupHook} */
export const setup = async (httpServer) => {
    // run your custom setup
};

🚀 Deployment

You just need the output directory (build by default) and the production dependencies to run the application. Production dependencies can be installed with the command npm install --production inside your output directory. You can then start your app with:

$ node index.js # inside your output directory

Your development dependencies get automatically bundled when needed.

💻 Technologies

📝 Ways to contribute

Everyone interested in contributing should read the Code of Conduct.

Developers interested in contributing should also read the Contribution Guide.

Aside from code contributions that make the project better, there are a few other specific ways that you can contribute to this project.

🏋️ Motivation

This adapter was created because SvelteKit's maintainers don't like the idea of SvelteKit being an open node.js framework (Reference). While users wanting to add established node.js libraries or custom functionality to their node.js based SvelteKit applications.

📄 License

All parts of this project are free to use and abuse under the open-source MIT License.

Copyright 2023 © UnlimitedBytes