How to use globals variables in sass - vue 2.5.13 / generate on vue/cli-service 3.0.0-alpha.5
Use globals variables in sass - vue 2.5.13 / generate on vue/cli-service 3.0.0-alpha.5
Hi, thanks for your interest but Github issues are for bug reports and feature requests only. You can ask questions on the forum, the Discord server, gitter or StackOverflow.
The answer you're looking for is at https://vue-loader.vuejs.org/en/configurations/pre-processors.html 馃檪
We will have dedicated documentation for this use case.
In brief, this is what you need:
// vue.config.js
module.exports = {
css: {
loaderOptions: {
sass: {
data: fs.readFileSync('./src/variables.scss', 'utf-8')
}
}
}
}
Most helpful comment
We will have dedicated documentation for this use case.
In brief, this is what you need: