Answer the question
In order to leave comments, you need to log in
Can't see global sass variables in nuxt?
Connected sass styles globally via css property in nuxt.config.js
css: [
'@/assets/style/global.sass'
],
modules: [
[
'nuxt-sass-resources-loader',
[
'assets/style/global.sass'
]
]
],
// Или способ через style-resources
styleResources: {
sass: [
'@/assets/style/main.sass'
]
},
modules: [
'@nuxtjs/style-resources'
]
Answer the question
In order to leave comments, you need to log in
I connected like this
{
loader: "sass-loader",
options: {
sourceMap: true,
data: `
@import "@scss/_variables.scss";
@import "@scss/_functions.scss";
@import "@scss/_mixins.scss";
`
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question