Convika

Русской версии пока нет — показана английская.

How to deploy a Svelte or SvelteKit app for free

Quick answer

To deploy a Svelte app for free, run npm run build and drop the folder on Convika's upload box: dist for a Vite Svelte app, build for SvelteKit with adapter-static. The box puts the JavaScript, CSS, and images inside one page and gives you a preview link in seconds, with no account. Sign up free, with no credit card, and publish it at a lasting link. A SvelteKit build with its pages and script chunks goes up on the dashboard's upload screen as a site at its own address, with no setting changed.

Deploy my Svelte app for free

Free plan: no credit card, 5 published pages, 10,000 page views a month.

On this page

To deploy a Svelte app for free, build it and drop the folder the build makes on the box above. A Svelte app made with Vite builds into dist. A SvelteKit app with adapter-static builds into build, after 3 lines in svelte.config.js. The box reads the folder in your browser, puts the JavaScript, CSS, and images inside one page, and gives you a link in seconds. No Git, no account for the preview, and no credit card to publish.

Which setup you have

Your projectBuild commandFolder to drop
Svelte with Vite (npm create vite@latest, Svelte template)npm run builddist
SvelteKit (npx sv create) with adapter-staticnpm run buildbuild

.svelte files are source code: npm run build compiles them into a folder of plain HTML, JavaScript, and CSS. That folder is the app, and it is what you upload.

Set up SvelteKit for one page

SvelteKit 2.14 and later build the whole app into one HTML file with 3 settings. Install the static adapter:

npm install -D @sveltejs/adapter-static

Then add 3 lines to kit in svelte.config.js. Keep preprocess and any other lines your project has:

import adapter from "@sveltejs/adapter-static";
import { vitePreprocess } from "@sveltejs/vite-plugin-svelte";

export default {
  preprocess: vitePreprocess(),
  kit: {
    adapter: adapter({ fallback: "index.html" }),
    output: { bundleStrategy: "inline" },
    router: { type: "hash" },
  },
};
  • bundleStrategy: "inline" writes all the app's JavaScript and CSS into the HTML. SvelteKit's docs: "The result is usable without a server."
  • router: { type: "hash" } keeps every route at the page's one address: /about opens at yourpage.convika.page/#/about. Write links with the hash: <a href="#/about">.
  • fallback: "index.html" makes the adapter write the app to build/index.html, the file the box turns into the page.

A Svelte app made with Vite needs none of this: it builds into one script as it is. To keep SvelteKit's settings as they are, upload its build as a site instead, as below.

Deploy a Svelte app in 5 steps

1. Set up, then build

For SvelteKit, write the settings above first. Then, in the project folder, run:

npm install
npm run build

2. Drop the folder on the box

Drop dist or build on the box at the top of this page, or zip it and drop the .zip. The box shows at once what it combined into one file: the JavaScript, the CSS, and the images. Click Get my preview link.

3. Check the preview

Open the link on your computer and your phone. It works for 3 minutes, with scripts and forms on, so every route and button runs as it will live.

4. Keep the page

Click Keep this page — free, no card and sign up. The app moves into your account.

5. Publish it

Click Publish page. Under Who can open this page?, choose Public and click Next. The first time, Convika shows Publish free, and under it Publish without the Convika bar, which starts Pro with its free trial: 7 days free, then $12 a month, cancel any time before it ends. To publish on Free, click Publish free. The app is live at an address like yourpage.convika.page.

Base path: leave it as it is

The build writes its paths from the root, such as /assets/index-4f2a.js. The box reads a path that starts with / from the folder that holds index.html, so those files go into the page as they are. Keep base in vite.config.js and paths.base in svelte.config.js at their defaults.

Images go into the page

An image in the HTML, in the CSS, or in a component goes into the page. In a Svelte app made with Vite, import logo from "./assets/logo.png" and <img src={logo} alt=""> work with no setting: the box finds image paths in the built script, such as "/assets/logo-3f2a.png", and puts the image from the folder in their place.

SvelteKit: with bundleStrategy: "inline", raise Vite's inline size in vite.config.js, so the build writes images into the HTML too:

export default defineConfig({
  plugins: [sveltekit()],
  build: { assetsInlineLimit: 100000000 },
});

The whole page, images included, fits in 4 MB. Large photos and video load from an https:// address and don't count toward it.

A build with pages and chunks goes up as a site

The box puts each <script src> of index.html inside the page, and names the files a script loads later with import() as soon as you drop the folder, above Get my preview link. A SvelteKit build with adapter-static and its default settings writes such chunks and an .html file per prerendered page.

That build goes up whole as a site. Sign up free and drop build or dist on the dashboard's upload screen:

  • Its own address. The Site URL field offers a free address, such as yourapp.convika.page, and the app opens at / of it, so every /_app/ file loads from its own path.
  • Routes as you wrote them. /about opens about.html or about/index.html, a path the site doesn't have opens its 404.html or index.html, and links stay <a href="/about">, with no hash router.
  • Sizes. Each .html file up to 4 MB, and all the files together up to 100 MB on Free and 5 GB on Pro.

Click Create my preview, check the private preview, and publish it as in step 5.

Change the code and run npm run build again. In Convika, open your live page's screen. Under Update from an HTML file, click Upload a new version and drop the new dist or build folder, or its .zip. Click Upload as a new version, open the preview, then click Publish v2 at the same link and confirm with Publish. Everyone with the link sees the new build.

What Free includes, and what Pro adds

FreePro
PriceNo credit card7 days free, then $12 a month
Apps live at once5100
Page views a month10,000100,000
Who can open itPublicPublic, Private link, or Only people with the password
Convika bar on the pageYesNo
Custom domains1Unlimited

Frequently asked questions

How do I deploy a Svelte app for free?

Run npm run build and drop the folder it makes on Convika's upload box: dist for Svelte with Vite, build for SvelteKit with adapter-static. Click Get my preview link, then Keep this page — free, no card, and publish with Publish page, Public, Next, and Publish free. The Free plan needs no credit card.

How do I deploy SvelteKit with adapter-static?

Install @sveltejs/adapter-static, and in kit in svelte.config.js set adapter({ fallback: "index.html" }), output: { bundleStrategy: "inline" }, and router: { type: "hash" }. Run npm run build and drop the build folder on the box. Or keep the adapter's defaults and drop build on the dashboard's upload screen, where it goes up as a site.

Does SvelteKit routing work on Convika?

Yes. In one page, use router: { type: "hash" }: each route opens at an address like /#/about, and links start with #/. A reload opens the app on any route. A build uploaded as a site on the dashboard's upload screen keeps SvelteKit's own router, with routes such as /about.

Do I need to change the base path?

No. The box reads paths that start with / from the folder that holds index.html, so a build with the default base goes in as it is.

Do I need Git or GitHub to deploy a Svelte app?

No. The box takes the folder or a .zip straight from your computer.

Next step

How to password protect an HTML page or website

A JavaScript password sits in the page source. Free: StatiCrypt or .htaccess. Paid: Netlify Pro $20, Vercel $20 a project, Tiiny Host $18, or Convika Pro.

Related articles

More ways to send your page

Skipbox

Cheap & fast GitHub Actions runners, unlimited for $39 a month

Your own machine keeps Docker layers and package caches between jobs. Switch by changing one runs-on line.

Start a free Skipbox trial⁠

Share this article

Your Svelte app, live at one link

Drop the dist or build folder. Convika hosts the app, counts its visitors, and keeps the link when you upload a new build.

Deploy my Svelte app for free

Free plan: no credit card, 5 published pages, 10,000 page views a month.