Skip to main content
Percher is still being built, but you can try it out with a free account right now!
← All deploy guides
Deploy guide · runtime = "docker"

Ship Preact in ~2 minutes.

Preact is a ~3 kB React-compatible alternative with the same JSX, hooks, and component API. On Vite it ships exactly like Vite + React but with a much smaller runtime in the final bundle.

Why Percher fits

  • Tiny runtime + slim Caddy image means the served bundle is often under 50 kB total — fast first paint, no cold-start delay.
  • Standard `VITE_*` env-var auto-forwarding works identically to React; same migration path.

Quick start

bunx percher create my-app --template preact
cd my-app
bunx percher publish

The first command scaffolds a working Preact project plus a percher.toml. Publish builds and deploys it, then prints the live URL.

percher.toml

The canonical config for a Preact app on Percher. bunx percher init generates this automatically when it detects Preact in your project.

[app]
name = "my-app"
runtime = "docker"
framework = "preact"

[web]
port = 8080
health = "/"

Common gotchas

  • `preact/compat` aliases `react` and `react-dom` if you're porting code that imports React directly — set up the alias in `vite.config.ts`.
  • Bundle size advantage is preserved only if you don't pull in heavy React-only libraries. Watch the build output.

Related docs

Ready to deploy Preact?

Start on the Free plan. No credit card, live in ~2 minutes.

Sign up free →