Pre-processors

Configuration your application to use pug and sass with style resources to easily add variables to all components.


In this example:

pages/index.vue uses pug as a template language and sass for styling.

nuxt.config.js:

  • registers the style resources module.
  • contains a styleResources property to add assets/variables.scss.
  • contains a css property to add assets/main.scss.

package.json shows the dependencies needed.

Loading Sandbox...
Editer cette page sur GitHub Mise à jour le Mon, July 12, 2021