Answer the question
In order to leave comments, you need to log in
How to include scss in vue.config.js?
const path = require('path')
function resolve (dir) {
return path.join(__dirname, dir)
}
module.exports = {
chainWebpack: config => {
config.resolve.alias
.set('@', resolve('src'))
},
css: {
loaderOptions: {
sass: {
data: `@import "@/scss/settings.scss";`
//data: `@import "/src/scss/settings.scss";`
//data: `@import "./src/scss/settings.scss";`
}
}
}
}
Answer the question
In order to leave comments, you need to log in
While added to app.vue
<style lang="scss">
@import '@/scss/settings.scss';
</style>
https://cli.vuejs.org/ru/guide/css.html#css-%D0%BC...
there is a lot on your question
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question