Skip to content

Vite

Deploy a plain Vite site to LeafCloud.

Validated with Node v24.22.1, Vite 8.3.5, and npm. No configuration change is required.

  1. Create the official vanilla starter:

    Terminal window
    npm create vite@latest app -- --template vanilla < /dev/null
    cd app
    npm install < /dev/null
  2. No config change is needed.

  3. Preview the deployment:

    Terminal window
    leaf deploy --dry-run

    Expected output:

    Framework: Vite
    Package manager: npm
    Build command: npm run build
    Output directory: dist
    Files: 7
    Total size: 44929 bytes
    Dry run: nothing was uploaded.

    A real deploy prints ✓ Live at <url> (<files> files, <uploaded> uploaded) instead of the final dry-run line.

Vite; npm run build; dist.

No Vite-specific refusal was captured in validation.

Run leaf deploy --dry-run --json first. Check the exit code and stop if the JSON contains "error". After a successful dry run, run leaf deploy --json --yes. Never print credentials.

Validated on 2026-10-23 with Vite 8.3.5.