The Assets Directory
The
assets directory contains your un-compiled assets such as Less, Sass or JavaScript.The Components Directory
The
components directory contains your Vue.js Components. Nuxt.js doesn't supercharge the data method on these components.The Layouts Directory
The
layouts directory contains your Application Layouts.
This directory cannot be renamed.
The Middleware Directory
The
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).The Pages Directory
The
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.
The Plugins Directory
The
plugins directory contains your Javascript plugins that you want to run before instantiating the root Vue.js Application.The Static Directory
The
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.
The Store Directory
The
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.
This directory cannot be renamed.
The nuxt.config.js File
The
nuxt.config.js file contains your Nuxt.js custom configuration.
This file can not be renamed.
The package.json File
The
package.json file contains your Application dependencies and scripts.
This file can not be renamed.
Aliases
| ALIAS | DIRECTORY |
|---|---|
~ or @ | srcDir |
~~ or @@ | rootDir |
By default,
srcDir is the same as rootDir.
Info: Inside your
vue templates, if you need to link to your assets or static directory, use ~/assets/your_image.png and ~/static/your_image.png.
No comments:
Post a Comment