Let’s create the directories and files that do not exist in our project yet.

    These are the main directories and files that we use when building a Nuxt.js application. You will find an explanation of each of them below.

    Creating directories with these names enables features in your Nuxt.js project.

    The directory contains your application’s views and routes. As you’ve learned in the last chapter, Nuxt.js reads all the .vue files inside this directory and uses them to create the application router.

    Directory Structure - 图2

    Learn more about the pages directory

    The components directory

    With Nuxt.js 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.js will scan and auto import these for you once you have components set to true.

    Learn more about the components directory

    The assets directory contains your uncompiled assets such as your styles, images, or fonts.

    Directory Structure - 图4

    Learn more about the

    The static directory

    The 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)

    Learn more about the

    The file is the single point of configuration for Nuxt.js. If you want to add modules or override default settings, this is the place to apply the changes.

    Learn more about the nuxt.config.js file

    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 , layouts, , modules, and store . As they aren’t necessary for small applications, they are not covered here.

    Directory Structure - 图7