stackapRequest access

Frameworks

Vite and single-page apps on Stackap

Stackap builds a Vite, Create React App, Vue CLI or Parcel project in a container and serves the output from nginx, sending unknown paths to index.html so client-side routing works.

How Stackap recognizes Vite

A project counts as a single-page app when it has a build script and lists vite, react-scripts, @vue/cli-service or parcel as a dependency. Dependencies are checked before scripts on purpose: Vite and Create React App both define a start script that launches a development server, and treating them as Node apps would deploy a dev server to production. React apps are covered by this path whether they use Vite or Create React App.

What Stackap builds

The generated image has two stages. The first installs dependencies with the package manager the lockfile implies and runs your build script. The second is nginx, which serves the build output and falls back to index.html for any path that is not a file, so a route such as /settings opened directly does not return a 404.

Because the result is static files, there is no server code to run, memory use is tiny, and a build-time variable is baked into the files. Anything prefixed the way your bundler requires for public values, for example VITE_ in Vite, is visible to every visitor and must never hold a secret.

What a Vite project needs

Verification status

Tested with a real Docker build of the generated image for the single-page-app path, including the index.html fallback, as part of the platform's own test suite.

Still to verify: a catalogue of individual Vite versions, plugins that write their output somewhere unusual, or monorepos where the app is not at the repository root.

Early-access scope

Questions

Does it work for React?
Yes, when the React app is built with Vite or Create React App. Next.js is handled separately because it has a server.
Why is a missing page not a 404?
A single-page app handles its own routing in the browser, so the server returns the shell for unknown paths and lets the app decide. That is the standard trade-off for this kind of app.

Stackap is in early access. Tell us what you run and we will reply with a straight answer about whether it fits.

Ask for an invitation

Last updated .