Framework Guides
Svelte / SvelteKit
Deploy a Svelte or SvelteKit project to Sample.app.
SvelteKit requires the static adapter to generate deployable static files.
Deploy with SvelteKit
Install the static adapter
npm install -D @sveltejs/adapter-staticConfigure the adapter
import adapter from "@sveltejs/adapter-static";
export default {
kit: {
adapter: adapter({
fallback: "index.html",
}),
},
};Setting fallback: 'index.html' enables SPA mode, which works with Sample.app's built-in SPA
fallback for client-side routing.
Deploy to Sample.app
samplex deploy ./buildPlain Svelte apps (without SvelteKit) use Vite and output to dist/ by default.
Deploy with Svelte + Vite
Build your project
npm run build
