Vite

Vite uygulamanı deploy et

Vite is the build tool, not the framework — vanilla JS, React, Vue, Svelte, Preact, whatever you picked when you ran npm create vite. Every official template builds the same way and lands in the same folder.

steps
  1. 01

    Build the project

    Run "npm run build". This runs "vite build" under the hood, bundling and minifying into static files.

  2. 02

    Check the output folder

    Vite writes to "dist" by default across every official template. If your vite.config sets build.outDir to something else, use that folder instead.

  3. 03

    Deploy et

    Proje kök dizininden "npx harvis deploy dist" çalıştır. Bu ilk deploy için yapılandırma ve giriş gerekmez — hemen canlı bir URL alırsın, ayrıca hazır olduğunda siteyi ücretsiz bir hesaba bağlamak için özel bir claim bağlantısı.

Vite'i tek komutla deploy et

Projeni derle, ardından çıktı klasörünü harvis'e ver. İlk deploy için hesap gerekmez — canlı bir bağlantı ve daha sonra yönetmek için özel bir claim bağlantısı alırsın.

terminal
npm run build
npx harvis deploy dist

Terminal yerine dosyaları sürüklemeyi mi tercih edersin? Projeni derle, ardından çıktı klasörünü buraya bırak ve aynı şekilde yayınla.

git hook

Deploy Vite on every git push

The command above is one you will run again after every change. A git hook runs it for you: this one already points at dist, the folder Vite builds into.

The folder holding the finished site. "." is the repo root, which is right for hand-written HTML; a static-site generator writes somewhere else.

pre-push fires on every branch and every remote, so a feature branch would publish over your live site. With this on, a push from anywhere else exits early and goes through untouched.

in your repo root
cat > .git/hooks/pre-push <<'EOF'
#!/bin/sh
set -e
npm run build
harvis deploy dist
EOF
chmod +x .git/hooks/pre-push

The options, the gotchas and how to share a hook with your team are on the git hook page.

Vite deploy soruları

Does it matter which Vite template I used?

Not to the deploy step. Vanilla, React, Vue, Svelte, Lit, Preact — they all end up as static files in dist. What changes between templates is what happens in your app; the hosting side is identical.

I have a multi-page Vite app (multiple entry HTML files). Does that work?

Yes. Vite's build.rollupOptions.input support for multiple entrypoints just produces more HTML files in dist, each one a normal page here — visit /about.html or whatever your entry files are named.

Bir Vite uygulamasını harvis'e deploy etmek gerçekten ücretsiz mi?

Evet, kart gerekmez. Ücretsiz limitler site başına 500 dosya ve 50 MB'dır, bu da statik bir Vite build'i için bol bol yer bırakır. Yayınlanan siteler süresi dolmaz — sen silene kadar yayında kalırlar.

Deploy edilen Vite sitesinde kendi alan adımı kullanabilir miyim?

Her site ücretsiz bir harvis.page adresi alır ve claim ettikten sonra panondan kendi alt alan adını seçebilirsin — rastgele biri yerine my-app.harvis.page gibi. Zaten sahip olduğun bir alan adını (mystore.com gibi) siteye yönlendirmek henüz desteklenmiyor.

Bunun Vite'i Vercel veya Netlify'a deploy etmekten farkı ne?

Vercel ve Netlify, bir Git reposunu bağlamak ve build'ini onların sunucularında çalıştırmak üzerine kuruludur, yapılandırmak için de bir panoya sahiptirler. harvis bunların hepsini atlar: yerelde (ya da kendi CI'nda) derlersin, çıktı klasörüne karşı tek bir CLI komutu çalıştırırsın ve bir bağlantı alırsın — proje kurulumu yok, siteyi saklamak isteyene kadar hesap da yok.

other frameworks

Başka bir şey mi deploy ediyorsun?

Tarif her yerde aynı — derle, ardından npx harvis deploy ile çıktıyı yayınla.