Deploy React.js
React apps fit Mekong hosted deployment well when you upload the compiled frontend output instead of the raw source project.
Use the static template in the dashboard for both React Classic and React Vite.
React Vite
Build the app so Vite creates dist/:
npm run buildZip the contents inside dist/, not the parent folder:
cd dist
zip -r ../react-vite.zip .Upload react-vite.zip with the React Vite template in /dashboard/deploy.
React Classic
For Create React App or older React setups that compile into build/:
npm run build
cd build
zip -r ../react-classic.zip .Upload react-classic.zip with the React Classic template in /dashboard/deploy.
What the archive should look like
After unzip, the archive root should look like this:
index.html
assets/...
static/...The important part is that index.html is directly at the top level of the archive.
Dashboard flow
- Run the production build
- Zip only the generated output folder contents
- Open
/dashboard/deploy - Choose
React ClassicorReact Vite - Upload the archive and choose your subdomain
- Wait for the live URL
Best fit
Hosted deployment works well for:
- single-page React apps
- static marketing sites
- React builds produced by Vite or Create React App
- frontend-only dashboards and admin panels
When to use a tunnel instead
Use a normal Mekong tunnel if your React project depends on:
- a live dev server with HMR
- a backend running on your machine
- server-side rendering
For development, see the existing Vite and Next.js tunnel guides.