Skip to main content

Directory Structure

The default Nuxt.js application structure is intended to provide a great starting point for both small and large applications. Of course, you are free to organize your application however you like.

FolderDescription
assetsThe assets directory contains your un-compiled assets such as Less, Sass or JavaScript.
componentsThe components directory contains your Vue.js Components. Nuxt.js doesn't supercharge the data method on these components.
dataThe data directory contains system datats
layoutsThe layouts directory contains your Application Layouts. This directory cannot be renamed.
middlewareThe middleware directory contains your Application Middleware. Middleware lets you define custom functions that can be run before rendering either a page or a group of pages (layouts).
pagesThe pages directory contains your Application Views and Routes. The framework reads all the .vue files inside this directory and creates the application router. This directory cannot be renamed.
pluginsThe plugins directory contains your Javascript plugins that you want to run before instantiating the root Vue.js Application.
staticThe static directory contains your static files. Each file inside this directory is mapped to /. Example: /static/robots.txt is mapped as /robots.txt This directory cannot be renamed.
storeThe store directory contains your Vuex Store files. The Vuex Store option is implemented in the Nuxt.js framework. Creating an index.js file in this directory enables the option in the framework automatically.
testunit test files are located here
utilsutils folder is a place where you can place small snippets you can use throughout the application.