Variables not getting to scss files
Closed this issue · 1 comments
IAMtheIAM commented
After I got the issue resolved in #18, now the variables are not getting passed to any .scss files.
Undefined variable: "$env".
sass-js-vars.js
module.exports = {
env: METADATA.ENV, // doesnt work even thought this value exists
};
scss file
// Set the default environment for all scss files to refer to
$dev: false;
// Env variable - coming from Sass-Vars-Loader
@if $env == 'development' {
$dev: true;
}
Worked fine in 2.x, not 3.x
If i switch to
const sassVarsConfig = {
syntax: 'scss',
vars : {
env: METADATA.ENV,
}
};
The error is the same, for some reason its not getting passed into my scss files. Any ideas?
IAMtheIAM commented
Nevermind, I had an error, it works now. I forgot to update one section of my loaders to use the sassVarsConfig
as a loader option instead of a querystring. :-D