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

[Question] Is it possible to inject dependencies into scss files (for example using DefinePlugin) #9

Closed
okonet opened this issue May 7, 2014 · 2 comments

Comments

@okonet
Copy link

okonet commented May 7, 2014

Is it possible to pass some "free" variables (which depends on build settings in my case) into scss files. For javascript I use DefinePlugin. Is there a way to do the same for scss?

@jtangelder
Copy link
Member

I don't see an option in the node-sass api to inject vars, so for now this isn't possible.

A way you could do this anyway is to create some var-files: vars.dev.scss, vars.prod.scss and depending on the type of build clone one named as vars.scss .
Then just @import "vars"; in your stylesheet and it should work...

@okonet
Copy link
Author

okonet commented May 7, 2014

I see... Thanks for your response!

@okonet okonet closed this as completed May 7, 2014
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

2 participants