Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Variables not getting to scss files #19

Closed
IAMtheIAM opened this issue Dec 18, 2017 · 1 comment
Closed

Variables not getting to scss files #19

IAMtheIAM opened this issue Dec 18, 2017 · 1 comment

Comments

@IAMtheIAM
Copy link
Contributor

IAMtheIAM commented Dec 18, 2017

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
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant