name: nuxt-vue-typescript description: Use when working in the Nuxt app directory, Vue components, composables, or TypeScript types for this project.
Nuxt, Vue, and TypeScript – kickstart-nuxt-ssr
When to use
- Adding or changing pages, components, composables, or plugins under
app/. - Deciding where shared TypeScript types live versus Nuxt-generated types.
- Configuring or using Tailwind via the Nuxt module.
Instructions
Layout conventions
- This project uses Nuxt 4 with the
app/directory: e.g.app/app.vueas the root component,app/plugins/for plugins,app/composables/for composables (auto-imported by Nuxt).
Plugins vs composables
- Plugins (
app/plugins/*.ts) run at app initialization; use for singleton setup (e.g. Contentstack stack). They returnprovidevalues consumed as$stack,$preview, etc. - Composables (
app/composables/*.ts) encapsulate data loading and are auto-imported;useGetPagewrapsuseAsyncDatafor SSR-friendly fetching.
TypeScript
- Root
tsconfig.jsonextends./.nuxt/tsconfig.json— do not hand-edit generated.nuxtoutputs. - Shared domain types for Contentstack responses live in repository-root
types.tsand are imported where needed (e.g.useGetPage).
Styling
@nuxtjs/tailwindcssis registered innuxt.config.tsmodules. Use utility classes in SFC templates; global styles inapp.vueare minimal (e.g.bodybackground).
Server types
server/tsconfig.jsonextends../.nuxt/tsconfig.server.jsonfor server-side TypeScript if you add server routes or Nitro handlers later. This kickstart does not define custom server API routes by default.