Enable pre-processors of global scss variables
[issue link]I would like to apply this preprocessor feature to be able to load SCSS variables globally but not know how to configure this in nuxt.
How can I do it?
https://vue-loader.vuejs.org/en/configurations/pre-processors.html#loading-a-global-settings-file
{
loader: 'sass-resources-loader',
options: {
resources: path.resolve(__dirname, '../src/style/_variables.scss')
}
}
My nuxt.config.js
module.exports = {
head: {
title: 'starter',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ hid: 'description', name: 'description', content: 'Nuxt.js project' }
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' },
{ rel: 'stylesheet', href: 'https://fonts.googleapis.com/css?family=Roboto+Mono' }
]
},
loading: { color: '#3B8070' },
build: {
extend (config, ctx) {
if (ctx.isClient) {
config.module.rules.push({
enforce: 'pre',
test: /\.(js|vue)$/,
loader: 'eslint-loader',
exclude: /(node_modules)/
})
}
}
}
}