UPLOAD THE BUILD OUTPUT

Vite dist vs. source: which folder do I upload?

For a Vite website, build locally and upload the generated dist directory—not src, node_modules, or the development project.

Short answer

Upload Vite's built dist/ output. The src/ directory contains authoring code that browsers cannot necessarily run as-is, while dist/ contains the production HTML, JavaScript, CSS, and fingerprinted assets created by vite build.

Use this when your project contains vite.config, src/, package.json, and an npm build script.

01

Build before you package

Run the build with the lockfile and toolchain the project expects. Then preview the generated result locally and inspect dist/ itself. Vite's preview command is for local review, not the production server.

npm ci
npm run build
npm run preview

Primary reference: Vite: deploying a static site.

02

Package only what the static host needs

  • Set framework to react-vite or vue-vite as appropriate.
  • Use the fixed node-static build declaration and output dist in small-site.json.
  • Do not include src/, node_modules/, package.json, lockfiles, source maps, caches, or the build configuration in the upload ZIP.
  • Rebuild and repackage whenever source changes; do not treat dist/ as the editable project.
small-site.json
dist/
  index.html
  assets/
    index-a1b2c3.js
    index-d4e5f6.css
03

Diagnose broken asset paths

If the preview works but the published page is blank, inspect the built index.html and its asset URLs. A project built for a nested base path may point somewhere that does not exist at the site root. Small Site v1 uses basePath "/", so build the site for the root unless the contract changes.

Primary reference: Vite: building for production.

READY WHEN THE ZIP IS

Validate it. Scan it. Put it online.

Small Site publishes bounded static artifacts at a stable HTTPS URL. The public founding beta is $5 USD/month for up to three active sites.

Create an account and publish