Framework
Svelte (Vite)
Svelte apps built with Vite (create-svelte), served as static files by Nginx.
Container port
80Requirements
package.json with a "build" script that outputs to dist/
Standard Svelte + Vite template does this. SvelteKit with adapter-node outputs to build/ — use Node.js framework for that.
Demo app
A minimal app that is ready to push and deploy. Copy the files below into a new repository, commit, and deploy — it should go live without any changes.
Quickstart
npm create vite@latest my-svelte-app -- --template svelte
src/App.svelte
<script>
const message = 'Hello from DropDeploy!';
</script>
<main>
<h1>{message}</h1>
<p>Svelte + Vite app is live.</p>
</main>
<style>
:global(body) {
font-family: system-ui, sans-serif;
background: #0f172a;
color: #f1f5f9;
margin: 0;
}
main {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
min-height: 100vh;
text-align: center;
gap: 0.5rem;
}
h1 { color: #f97316; }
p { color: #94a3b8; }
</style>src/main.js
import App from './App.svelte';
const app = new App({ target: document.getElementById('app') });
export default app;Use the Vite Svelte template (not SvelteKit). For SvelteKit with adapter-node, use the Node.js framework type instead.
Build & start commands
DropDeploy runs these steps inside the container when you click Deploy.
npm install npm run build # Output in dist/ is served by Nginx — no start command needed
Common issues
SvelteKit with adapter-node
Outputs to build/, not dist/. Use the Node.js framework type and set your start script to "node build".