Vue 3 is, alongside React, the second most popular library for building user interfaces, and, just like React, it is not a hosting service in itself. A built project (most often using Vite) consists of static HTML, CSS and JS files that require a server with proper route fallback for Vue Router in history mode - without this, refreshing a subpage results in a 404 error. On Saplo, you deploy Vue in exactly the same way as any other app from the catalog: the engine builds the project, places the ready-made directory dist under nginx and configures the route fallback automatically.
Who is Vue on Saplo for
Before you start the installation, check whether this is the right choice for your project:
- you are building an admin panel - Saplo serves the ready-made build as static files, with no custom Node process running in the background,
- the frontend needs to connect to your own API - you host the SPA alongside the backend (Django, Node, Docker) on the same Box or separately,
- a single-page application with Vue Router in history mode - the fallback for all routes at
index.htmlis configured automatically, and you do not need to add anything to nginx, - you want deployments from
git pushinstead of manually uploading files via FTP - you connect the repository once, and every push to the production branch automatically builds and deploys a new version.
If the project requires server-side rendering and better SEO, look for the Nuxt stack in the application catalog instead of plain Vue.
Requirements
To deploy Vue on Saplo, you need:
- Box on any plan, even S is enough - a built SPA is just a set of static files, with no process kept in memory after the build,
- at least 256 MB of free RAM for the build process itself and 2 GB of disk space,
- a domain or subdomain
*.saploapp.plincluded in the price of every plan, - a Git repository if you want automatic deployments (optional to start, as you can also upload the application as a
.ziparchive via the panel).
Step-by-step installation
- In the Saplo panel, open Application Catalog and select Vue.js (category "Applications").
- Select the Box and enter the application name - the default subdomain is generated from it
<name>.saploapp.pl. - Select the Node.js version for the build (18, 20, or 22, with 20 as the default) and confirm the installation.
- The engine scaffolds a Vue skeleton using Vite (the equivalent of
npm create vite -- --template vue), installs the dependencies and builds the project. The contents of thedistdirectory go directly into the application directory, served by nginx. - After the installation is complete, the domain from step 2 displays the starter Vite + Vue skeleton - from then on, you deploy your own code to it.
Deploying your own code via Git
- In the application's details, find the Git / CI-CD section and click "Connect GitHub", confirm the installation of the "Saplo Deploy" application and select the repository with the Vue project.
- The repository's root directory must contain the
saplo.yamlfile. - Commit and push the
saplo.yamlfile to the production branch (by defaultmain). - Each subsequent
git pushon this branch builds the project and replaces the contents of thedistdirectory on the Box, and you can see the status in the Deployments tab. - If the build fails, the previous working version stays in place - Saplo does not replace it with a broken one.
Example of a minimal saplo.yaml file for Vue:
name: my-project
stack: vue
build:
install: npm ci
command: npm run build
output: dist
Vue on Saplo vs alternatives
| Shared hosting without SPA support | Firebase Hosting | Vue on Saplo | |
|---|---|---|---|
| Vue Router route fallback | redirects must be manually configured | built in | configured automatically |
| Deployment | manual file uploads | git push or CLI | git push to the production branch |
| Billing | fixed hosting cost | transfer usage, grows with traffic | fixed Box cost |
| Backend alongside the frontend | usually unavailable | separate service (functions) | the same Box, another application from the same directory |
Most common questions
Does Vue Router work in history mode without additional configuration?
Yes, the fallback for all paths to index.html is active immediately after installation, so refreshing any subpage doesn't result in a 404 error.
Can I have multiple Vue apps on a single Box? Yes, the app directory lets you set up multiple modules side by side, each with its own subdomain or domain.
Do you need SSR and better SEO - what should you choose? The Nuxt stack from the same directory is Vue with full server-side rendering.
Do I get SSL and my own domain?
Yes, the SSL certificate is automatic, and your own domain or subdomain *.saploapp.pl is included in the price of every plan.
How do I change the build output directory if I don't use the default dist?
Set the build.output field in saplo.yaml to the correct path.
With Saplo, you can take Vue from scratch to a working domain in just a few minutes, and Vue Router works without manual configuration. If your project grows to require SSR, migrating to Nuxt in the same directory doesn't require changing your hosting.
- #Git Deploy
- #JavaScript
- #Guide
- #SPA
- #Vue
