Appearance
src Directory
Pages can also be added under src/pages as an alternative to the root pages directory.
The src directory is very common in many apps and Next.js supports it by default.
Caveats
src/pageswill be ignored ifpagesis present in the root directory- Config files like
next.config.jsandtsconfig.json, as well as environment variables, should be inside the root directory, moving them tosrcwon't work. Same goes for thepublicdirectory
Related
For more information on what to do next, we recommend the following sections:
