You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a use case where I need to separate scss variables to become modular. With the current implementation, if I have two files and there are conflicting variables, I can't do anything to make it work together while using this package.
Proposal
nuxt.config.js:
exportdefault{buildModules: ['@nuxtjs/style-resources'],styleResources: {scss: {// allow object as config and use the key as module namefoo: './assets/foo/vars/*.scss',bar: './assets/bar/vars/*.scss',},},}
assets/foo/vars/_colors.scss:
$gray: #333;
assets/bar/vars/_colors.scss:
$gray: #444;
components/Test.vue:
<template>
<divclass="something">Test</div>
</template>
<stylelang="scss">.something {color: $foo-gray; // will be resolved to #333 }</style>
components/AnotherTest.vue:
<template>
<divclass="anotherthing">Test</div>
</template>
<stylelang="scss">.anotherthing {color: $bar-gray; // will be resolved to #444 }</style>
The text was updated successfully, but these errors were encountered:
Problem
I have a use case where I need to separate scss variables to become modular. With the current implementation, if I have two files and there are conflicting variables, I can't do anything to make it work together while using this package.
Proposal
nuxt.config.js
:assets/foo/vars/_colors.scss
:assets/bar/vars/_colors.scss
:components/Test.vue
:components/AnotherTest.vue
:The text was updated successfully, but these errors were encountered: