Nuxt
Documentation
Quickstart
Installation
npx --yes nuxi@latest init project-name
Configuration
Configure the Static Hosting option:
nuxt.config.ts
// https://nuxt.com/docs/api/configuration/nuxt-configexport default defineNuxtConfig({ compatibilityDate: '2024-04-03', devtools: { enabled: true }, ssr: true,})
Add a pages directory with an index.vue
file:
pages/index.vue
<template> <div>Home</div></template>
Update the Vue app to display pages with the NuxtPage component:
app.vue
<template> <div> <NuxtRouteAnnouncer /> <NuxtWelcome /> <NuxtLayout> <NuxtPage /> </NuxtLayout> </div></template>
Deploying a Static Client-Rendered App is also supported.
By default, the bunny-launcher
option spa
is set to false
for Nuxt.
Deployment
Build
npm run generate
Preview
npx --yes serve@latest .output/public
Deploy
npx --yes bunny-launcher@latest --interactive