🌿 Nuxt.js
Intermediate
What is the `app.vue` file in Nuxt.js 3?
Answer
app.vue is the root component of a Nuxt 3 application. If you have a pages/ directory, app.vue should contain <NuxtPage /> to render the current page. If you use layouts, it should include <NuxtLayout><NuxtPage /></NuxtLayout>. If your app is a single page without routing, app.vue can contain everything and you can omit the pages/ directory entirely. It's the right place to add global CSS imports, top-level error handling with <NuxtErrorBoundary>, and application-wide logic that runs once. The app.vue file is optional — if absent, Nuxt uses a default one.
Previous
How does Nuxt.js handle code splitting?
Next
How do you implement internationalization (i18n) in Nuxt.js?