Answer the question
In order to leave comments, you need to log in
How to include and compile global sass file in Nuxt.js?
How to include a global sass stylesheet to a template and compile it to Nuxt.js?
Found only how to import into each component, but this is not an option.
Plus it is not clear how to compile it in such a project.
Answer the question
In order to leave comments, you need to log in
Run
npm i @nuxtjs/style-resources -D
And add to nuxt.config.js
module.exports = {
modules: [
'@nuxtjs/style-resources',
],
styleResources: {
sass: [
'~/assets/globals.sass', // путь к вашему файлу
],
},
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question