A Vue 3 single-page app starter in JavaScript, built with Vite 8 and Vue Router 4 using the Composition API and <script setup>. It is for developers who want a clean Vue project with a shared layout, Home, About and 404 views, scoped styles, ESLint and Vitest with Vue Test Utils.
by Light CloudSingle-page apps


The project sticks to Vue, Vue Router and Vite with no extra state library, so it stays small and easy to read. Routes are declared in src/router/index.js and views live in src/views/, with the layout kept separate in src/layouts/. Most people start by editing HomeView.vue, then add views and, when they need shared state, Pinia. Deploying runs npm run build and serves dist/ from a CDN, with unknown paths sent to index.html for Vue Router.
Create a view in src/views/, add a route with component: () => import('@/views/ContactView.vue') to src/router/index.js, and add a RouterLink in src/layouts/DefaultLayout.vue.
HTML5 history mode needs the host to serve index.html for paths that are not files. Add a rewrite or SPA fallback on your host; Light Cloud does this for you.
No, it keeps to Vue and Vue Router. Install pinia and call app.use(createPinia()) in src/main.js when you need shared state, and add typescript and vue-tsc for type checking.
Add a line such as VITE_API_URL=https://api.example.com to .env.local and read it with import.meta.env.VITE_API_URL. Values are written into the bundle at build time, so never put secrets in them.
Yes. Run npm run build and serve dist/ from any static host, with a fallback to index.html for client-side routes.