Want to take a look at our new docs? Our new docs are now in beta. Have fun!

The css Property

Nuxt.js lets you define the CSS files/modules/libraries you want to set globally (included in every page).

In case you want to use sass make sure that you have installed sass and sass-loader packages. If you didn't just

npm install --save-dev sass sass-loader fibers
  • Type: Array
  • Items: string

In nuxt.config.js, add the CSS resources:

export default {
  css: [
    // Load a Node.js module directly (here it's a Sass file)
    // CSS file in the project
    // SCSS file in the project

Nuxt.js will automatically guess the file type by its extension and use the appropriate pre-processor loader for webpack. You will still need to install the required loader if you need to use them.


Contribution for this page is now closed. If you would like to contribute please check out our new docs are now in beta. Have fun!

Platinum Sponsors

StoryblokMoovweb Support Us