Directory Structure
The default Nuxt application structure is intended to provide a great starting point for both small and large applications. You are free to organize your application however you like and can create other directories as and when you need them.
Let's create the directories and files that do not exist in our project yet.
mkdir components assets static
touch nuxt.config.js
These are the main directories and files that we use when building a Nuxt application. You will find an explanation of each of them below.
Directories
The pages directory
The pages directory contains your application's views and routes. As you've learned in the last chapter, Nuxt reads all the .vue files inside this directory and uses them to create the application router.
The components directory
The components directory is where you put all your Vue.js components which are then imported into your pages.
With Nuxt you can create your components and auto import them into your .vue files meaning there is no need to manually import them in the script section. Nuxt will scan and auto import these for you once you have components set to true.
The assets directory
The assets directory contains your uncompiled assets such as your styles, images, or fonts.
The static directory
The static directory is directly mapped to the server root and contains files that have to keep their names (e.g. robots.txt) or likely won't change (e.g. the favicon)
The nuxt.config.js file
The nuxt.config.js file is the single point of configuration for Nuxt. If you want to add modules or override default settings, this is the place to apply the changes.
The package.json file
The package.json file contains all the dependencies and scripts for your application.
More about the project structures
There are more helpful directories and files, including content , layouts , middleware , modules , plugins and store . As they aren't necessary for small applications, they are not covered here.
Clément Ollivier
Daniel Roe
Alex Hirzel
Ajeet Chaulagain
René Eschke
Sébastien Chopin
Nico Devs
Muhammad
Nazaré da Piedade
Naoki Hamada
Tom
Yann Aufray
Anthony Chu
Nuzhat Minhaz
Lucas Portet
Richard Schloss
Xanzhu
bpy
Antony Konstantinidis
Hibariya
Jose Seabra
Eze
Florian LEFEBVRE
Lucas
Julien SEIXAS
Hugo
Sylvain Marroufin
Spencer Cooley
Piotr Zatorski
Vladimir Semenov
Harry Allen
kazuya kawaguchi
Unai Mengual
Hyunseung Lee
Alexandre Chopin
pooya parsa
Nick Medrano
Mosaab Emam
Iljs Путлер Капут
Heitor Ramon Ribeiro
Nero
Yoon Han
Ikko Ashimine
FamCodings
Ayouli
F. Hinkelmann
felipesuri
Christophe Carvalho Vilas-Boas
Leoš Literák
Trizotti
Marcello Bachechi
Rodolphe
Thomas Underwood
Shek Evgeniy
Lukasz Formela
Hugo Torzuoli