Skip to content
GigadriveDocs

SvelteKit

What Gigadrive Network detects in a SvelteKit project and which adapter output its defaults expect.

Gigadrive Network detects SvelteKit from @sveltejs/kit in package.json. The preset is tried well before the Vite preset, so a SvelteKit project is never mistaken for a plain Vite build even though it depends on Vite.

What the preset configures

SettingValue
Runtimenode-22
Memory256 MB
Maximum duration30 seconds
Functionbuild/index.js, serving /*
Assets directorybuild/client
EnvironmentNODE_ENV=production

The preset walks build/client after the build and publishes every file inside it, so the client bundle reaches the edge with no configuration of your own. Frameworks covers how a preset resolves its assets directory.

The adapter you need

Those paths are what @sveltejs/adapter-node writes. SvelteKit ships with @sveltejs/adapter-auto, which chooses an adapter from the hosting environment it recognises, so name the Node adapter explicitly and your output is the same on every machine:

import adapter from '@sveltejs/adapter-node';

/** @type {import('@sveltejs/kit').Config} */
export default {
  kit: {
    adapter: adapter(),
  },
};

A build that produces no build/index.js, which is what happens with a static or platform-specific adapter, stops the deployment before packaging with a message naming the missing file. The fix is either the Node adapter from the preceding example or your own entrypoint declaration.

Pointing at a different file

If your adapter writes elsewhere, declare the entrypoint in a gigadrive.yaml at the project root. Each section of that file replaces the matching part of the preset outright, so a custom entrypoint means restating the route and the asset directory too. Configuration covers the keys.

SvelteKit documents the Node adapter and its build output at svelte.dev/docs/kit/adapter-node.