Needs a static export
How to publish a SvelteKit site as a static export
SvelteKit renders on a server by default. Switching to the static adapter makes it publishable.
- Build command
- npm run build
- Folder to upload
- build
Free plan, free SSL, no credit card.
-
Build the project
Run npm run build in the project folder. This is the step Droply does not do for you: we publish finished pages, we never run your build.
-
Find the output folder
The build writes a finished site to build. That folder, not the project folder, is what gets uploaded.
-
Drag it in
Drop the folder (or a ZIP of it) into Droply. It is live on an HTTPS droply.id subdomain in seconds, and re-uploading publishes a new version at the same URL.
Worth knowing about SvelteKit
Install
@sveltejs/adapter-static, switch to it in svelte.config.js, then build. The site lands inbuild.Every route has to be prerenderable. A route that reads request data at runtime will fail the build with a clear message naming the route.
Did an AI tool build this project?
Hosting an AI-generated website covers the question that comes before the build command: whether what you are holding is a single file or a project, and which of the two every tool actually hands back.