docs: add app.config.ts to nuxt 4 testing/migration (#27164)

This commit is contained in:
Dominik Opyd 2024-05-12 10:47:27 +02:00 committed by GitHub
parent b5e35e3bd7
commit dd6da1c614
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -100,6 +100,7 @@ app/
pages/ pages/
plugins/ plugins/
utils/ utils/
app.config.ts
app.vue app.vue
router.options.ts router.options.ts
modules/ modules/
@ -126,7 +127,7 @@ nuxt.config.ts
##### Migration Steps ##### Migration Steps
1. Create a new directory called `app/`. 1. Create a new directory called `app/`.
1. Move your `assets/`, `components/`, `composables/`, `layouts/`, `middleware/`, `pages/`, `plugins/` and `utils/` folders under it, as well as `app.vue`, `error.vue`. If you have an `app/router-options.ts` or `app/spa-loading-template.html`, these paths remain the same. 1. Move your `assets/`, `components/`, `composables/`, `layouts/`, `middleware/`, `pages/`, `plugins/` and `utils/` folders under it, as well as `app.vue`, `error.vue`, `app.config.ts`. If you have an `app/router-options.ts` or `app/spa-loading-template.html`, these paths remain the same.
1. Make sure your `nuxt.config.ts`, `modules/`, `public/` and `server/` folders remain outside the `app/` folder, in the root of your project. 1. Make sure your `nuxt.config.ts`, `modules/`, `public/` and `server/` folders remain outside the `app/` folder, in the root of your project.
However, migration is _not required_. If you wish to keep your current folder structure, Nuxt should auto-detect it. (If it does not, please raise an issue.) You can also force a v3 folder structure with the following configuration: However, migration is _not required_. If you wish to keep your current folder structure, Nuxt should auto-detect it. (If it does not, please raise an issue.) You can also force a v3 folder structure with the following configuration: