Non è ancora in italiano, quindi la vedi in inglese.

How to deploy a React app for free, from Vite or Create React App

Quick answer

To deploy a React app for free, run npm run build and drop the folder it makes on Convika's upload box: dist for Vite, build for Create React App. The box puts the JavaScript, CSS, and images inside one page and gives you a preview link in seconds, with no account. Sign up free, with no credit card, and publish it at a lasting link. A build split into script chunks goes up on the dashboard's upload screen as a site at its own address, with React.lazy and BrowserRouter as they are.

Deploy my React app for free

Free plan: no credit card, 5 published pages, 10,000 page views a month.

On this page

To deploy a React app for free, build it and drop the folder the build makes on the box above. A Vite app builds into dist, and a Create React App project into build. The box reads the folder in your browser, puts the JavaScript, CSS, and images inside one page, and gives you a link in seconds. No Git, no account for the preview, and no credit card to publish.

What a React build is

The src folder holds JSX and TypeScript, which no browser runs as it is. npm run build turns it into plain files: an index.html, a JavaScript file, a CSS file, and the images the app imports. That folder is the app, and it is the only thing you upload.

Your projectBuild commandFolder to drop
Vite (npm create vite@latest, React template)npm run builddist
Create React App (react-scripts)npm run buildbuild

Once the app is built, you can drop the whole project folder too. The box takes the index.html in dist or build and skips node_modules.

Deploy a React app in 5 steps

1. Set the router, then build

If the app uses React Router, make the change under "Routing" below first. Then, in the project folder, run:

npm install
npm run build

Vite prints the files it wrote to dist/. Create React App says "The build folder is ready to be deployed."

2. Drop the folder on the box

Drop dist or build on the box at the top of this page, or zip it and drop the .zip. The box shows at once what it combined into one file: the JavaScript, the CSS, and the images. Click Get my preview link.

3. Check the preview

Open the link on your computer and your phone. It works for 3 minutes, with scripts and forms on, so every button and screen of the app runs as it will live.

4. Keep the page

Click Keep this page — free, no card and sign up. The app moves into your account.

5. Publish it

Click Publish page. Under Who can open this page?, choose Public and click Next. The first time, Convika shows Publish free, and under it Publish without the Convika bar, which starts Pro with its free trial: 7 days free, then $12 a month, cancel any time before it ends. To publish on Free, click Publish free. The app is live at an address like yourpage.convika.page.

Base path: leave it as it is

A Vite build writes its paths from the root, such as /assets/index-4f2a.js, and Create React App writes /static/js/main.3b1c.js. The box reads a path that starts with / from the folder that holds index.html, so those files go into the page as they are. Keep base in vite.config.js at its default, and leave out homepage in package.json.

Routing: use the hash router

The app lives at one address, and React Router switches screens inside it. Switch the router to its hash version, and each screen gets an address like yourpage.convika.page/#/about. A reload opens the app, on any screen.

// React Router, component style
import { HashRouter } from "react-router-dom";

<HashRouter>
  <App />
</HashRouter>
// React Router, data router
import { createHashRouter, RouterProvider } from "react-router-dom";

const router = createHashRouter(routes);
<RouterProvider router={router} />

The routes, <Link to="/about">, and useNavigate() stay exactly as you wrote them. An app that goes up as a site, as in the next section, keeps BrowserRouter as it is.

A build split into chunks goes up as a site

The box puts each <script src> of index.html inside the page. A part of the app that the code loads later on its own, with React.lazy(() => import("./Settings")) or import(), is a separate script file, and the box names those files as soon as you drop the folder, above Get my preview link.

That build goes up whole as a site. Sign up free and drop dist or build on the dashboard's upload screen:

  • Its own address. The Site URL field offers a free address, such as yourapp.convika.page, and the app opens at / of it, so /assets/index-4f2a.js and every chunk load from their own paths.
  • Routes as you wrote them. A path the site doesn't have opens its index.html, so with BrowserRouter, /about opens the app on that screen, on a reload too.
  • Sizes. Each .html file up to 4 MB, and all the files together up to 100 MB on Free and 5 GB on Pro.

Click Create my preview, check the private preview, and publish it as in step 5.

Images go into the page as they are

An image in index.html, in the CSS, or in a component goes into the page. The box finds image paths in the built script, such as "/assets/logo-3f2a.png" or "/logo.png", and puts the image from the folder in their place. So <img src="/logo.png" /> with the file in public/ works, and so does import logo from "./logo.png" in a Vite app.

Create React App joins the folder name to the image's path inside its script. Add a .env file beside package.json with this line, and build again, so it writes imported images into the script itself:

IMAGE_INLINE_SIZE_LIMIT=100000000

The whole page, images included, fits in 4 MB. Large photos and video load from an https:// address and don't count toward it.

Change the code and run npm run build again. In Convika, open your live page's screen. Under Update from an HTML file, click Upload a new version and drop the new dist or build folder, or its .zip. Click Upload as a new version, open the preview, then click Publish v2 at the same link and confirm with Publish. Everyone with the link sees the new build. Update a page at the same URL walks through it.

What Free includes, and what Pro adds

FreePro
PriceNo credit card7 days free, then $12 a month
Apps live at once5100
Page views a month10,000100,000
Who can open itPublicPublic, Private link, or Only people with the password
Convika bar on the pageYesNo
Custom domains1Unlimited

Every app gets visitor stats in the dashboard: who came, from where, and what they clicked. A form in the app can send its entries to your dashboard and email.

Frequently asked questions

How do I deploy a React app for free?

Run npm run build and drop the folder it makes on Convika's upload box: dist for Vite, build for Create React App. Click Get my preview link, then Keep this page — free, no card, and publish with Publish page, Public, Next, and Publish free. The Free plan needs no credit card.

Which folder do I upload, dist or build?

The one your build made. Vite writes dist, and Create React App writes build. Each holds index.html at its top, and that file is what the box starts from.

Do I need to change the base path or homepage?

No. The box reads paths that start with / from the folder that holds index.html, so a Vite build with the default base and a Create React App build with no homepage go in as they are.

Does React Router work on Convika?

Yes. In one page, use HashRouter or createHashRouter: each screen then has an address like /#/about, and a reload opens the app on any screen. An app uploaded as a site on the dashboard's upload screen keeps BrowserRouter, because a path the site doesn't have opens its index.html. Your routes and links stay the same.

Why does my deployed React app show a blank page?

The 2 usual causes: the project folder went in before a build, or the box got a build that loads parts later with React.lazy. Build first and drop dist or build. Any script the box couldn't combine shows by name in the box as soon as you drop the folder; drop that build on the dashboard's upload screen, and it goes up as a site with every chunk at its own path.

Do I need Git or GitHub to deploy a React app?

No. The box takes the folder or a .zip straight from your computer. Nothing to push, and no repository to set up.

Can I use my own domain?

Yes. Free connects 1 custom subdomain, such as app.yourdomain.com, and Pro connects as many as you like.

Next step

How to password protect an HTML page or website

A JavaScript password sits in the page source. Free: StatiCrypt or .htaccess. Paid: Netlify Pro $20, Vercel $20 a project, Tiiny Host $18, or Convika Pro.

Related articles

More ways to send your page

Skipbox

Cheap & fast GitHub Actions runners, unlimited for $39 a month

Your own machine keeps Docker layers and package caches between jobs. Switch by changing one runs-on line.

Start a free Skipbox trial⁠

Share this article

Your React app, live at one link

Drop the dist or build folder. Convika hosts the app, counts its visitors, and keeps the link when you upload a new build.

Deploy my React app for free

Free plan: no credit card, 5 published pages, 10,000 page views a month.