v3.4.0
With this release, you can now include Sass files:
{
loader: '@epegzz/sass-vars-loader',
options: {
files: [
path.resolve(__dirname, 'path/to/utils.scss'), // <-- new
path.resolve(__dirname, 'path/to/styles.json')
]
}
}
This can be useful in case you want to use Sass functions in your JavaScript/JSON files, like this:
// utils.scss
@function semiTransparent($color) {
@return rgba($color, 0.5);
}
// styles.json
{
"backgroundColor": "semiTransparent(blue)"
}