A
A
aweui2018-12-28 09:33:28
Vue.js
aweui, 2018-12-28 09:33:28

Global scss styles not working in Nuxt?

Hello!
nuxt.config.js, which has the required module installed:

modules: [
    ['nuxt-sass-resources-loader', '@/assets/sass/main.scss'],
  ],

package.json:
"dependencies": {
  "@nuxtjs/axios": "^5.0.0",
  "cross-env": "^5.2.0",
  "express": "^4.16.3",
  "nuxt": "^2.0.0",
  "nuxt-sass-resources-loader": "^2.0.5" 
  },
  "devDependencies": {
  "eslint-config-prettier": "^3.1.0",
  "eslint-plugin-prettier": "2.6.2",
  "node-sass": "^4.11.0",
  "nodemon": "^1.11.0",
  "prettier": "1.14.3",
  "sass-loader": "^7.1.0"
  }

the file structure where scss itself lies:
5c25c34b3a0ad775116147.png
npm run dev - everything should work, but no. For body background: red; not installed.
And yes, it doesn't compile at all.
What's the matter?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
aweui, 2018-12-28
@aweui

Question solved, thanks everyone.
Forgot to include in
css config: [
'@/assets/sass/main.scss'
],

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question