Skip to content

A React / Vite app

Vite is the most common tool today for React, Vue, and Svelte apps. The folder you upload is called dist.

Inside the project folder, there’s a file called vite.config.js (or .ts) and a file called package.json. If you see vite mentioned in package.json, you’re in the right place.

  1. Open a terminal in the project folder. On Mac: right-click the folder → “New Terminal at Folder”. On Windows: open the folder, type cmd in the address bar of the file explorer, and press Enter.

  2. Install the pieces it needs (first time only):

    Terminal window
    npm install
  3. Build the site:

    Terminal window
    npm run build

    After a few seconds, a dist folder appears in the project.

  4. Upload the dist folder to Bailey. It holds the index.html and everything else.

my-app/
├── src/ ← working files (DON'T upload)
├── node_modules/ ← behind-the-scenes (DON'T upload)
├── vite.config.js
├── package.json
└── dist/ ← ✅ THE FOLDER TO UPLOAD
├── index.html
└── assets/

One setting worth knowing (in case of a blank page)

Section titled “One setting worth knowing (in case of a blank page)”

By default, Vite assumes your site is served at the root of a domain, which is exactly the case on Bailey (your subdomain). So usually nothing to change.

But if the page is blank after uploading, add base: './' to vite.config.js:

vite.config.js
import { defineConfig } from 'vite';
export default defineConfig({
base: './', // relative paths → works anywhere
// ...
});

Then run npm run build again and re-upload dist. Full explanation → Why your site looks broken.

Hosted on Bailey