Skip to content

Latest commit

History

History
159 lines (107 loc) 路 4.08 KB

README.md

File metadata and controls

159 lines (107 loc) 路 4.08 KB

Vitesse for Nuxt 3


References:

馃И Working in Progress


馃枼 Online Preview

Features

  • 馃挌 Nuxt 3 - SSR, ESR, File-based routing, components auto importing, modules, etc.

  • 馃審 i18n customized intlify i18n - set preferred language according to browser, and save user's preferred language to cookie.

  • 鈿★笍 Vite - Instant HMR

  • 馃帹 UnoCSS - The instant on-demand atomic CSS engine.

  • 馃摝 Element Plus - Vue 3 UI component library.

  • 馃槂 Use icons from any icon sets in Pure CSS, powered by UnoCSS

  • 馃敟 The <script setup> syntax

  • 馃崓 State Management via Pinia, see ./composables/user.ts

  • 馃搼 Layout system

  • 馃洜 VueUse - collection of useful composition APIs

  • 馃悏 RxJS

  • 馃摜 APIs auto importing - for Composition API, VueUse and custom composables.

  • 馃弾 Zero-config cloud functions and deploy

  • 馃 TypeScript, of course

Plugins

Nuxt Modules

  • VueUse - collection of useful composition APIs.
  • ColorMode - dark and Light mode with auto detection made easy with Nuxt.
  • UnoCSS - the instant on-demand atomic CSS engine.
  • Pinia - intuitive, type safe, light and flexible Store for Vue.

IDE

We recommend using VS Code with Volar to get the best experience (You might want to disable Vetur if you have it).

Variations

Try it now!

Online

GitHub Template

Create a repo from this template on GitHub.

Clone to local

If you prefer to do it manually with the cleaner git history

npx degit antfu/vitesse-nuxt3 my-nuxt3-app
cd my-nuxt3-app
pnpm i # If you don't have pnpm installed, run: npm install -g pnpm

Dev

npm run dev

Website: http://127.0.0.1:3000 Graphql Playground: http://127.0.0.1:3000/api/playground

Deploy

Normal server

build

npm run build

start

npm run start

Serverless(aws lambda) mode

Setup CDN

set cdnURL in nuxt.config.ts

build with lambda preset
npm run build:lambda
upload static files

upload .output/server/public/* to cdn (cdnURL)

custom domain (optional)

config customDomain in serverless.yml

custom:
  customDomain:
    http:
      domainName: xxx.yourdomain.com
      endpointType: regional
      certificateName: yourdomain.com
      createRoute53Record: true
plugins:
  - serverless-domain-manager

then

npm run serverless:domain

deploy

npm run serverless:deploy

then visit xxx.yourdomain.com