Do I have to specify in the nuxt config files if I am using the app dir?
I am using Nuxt 4 and was wondering if I have to specify the
src dir in the NuxtConfig file if the said file is in the root of the project and I am using the app dir structure.3 Replies
Hi @Sagar Kapoor. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
No, you do not have to specify the
srcDir in your Nuxt config if you are using Nuxt 4 and your nuxt.config.ts file is in the root of your project with the new app/ directory structure. In Nuxt 4, the default srcDir is already set to app/, so unless you want to customize it, you can omit this option from your configuration. Nuxt will automatically resolve your source files from the app/ directory by default New Directory Structure feat(nuxt,schema): support v4 folder structure.
You only need to specify srcDir if you want to use a different directory for your source files or revert to the old structure. Otherwise, the default behavior is sufficient.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------<@565461230060306432> Kapa.ai is still learning and improving, please let me know how I did by reacting below.
can you be more specific on what you are trying to do? the question is too ambiguous now