-
-
Notifications
You must be signed in to change notification settings - Fork 430
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
functions option support #152
Conversation
Makes sense, but not sure about conflicts if same option present both in query and sassLoader. |
I'd say that sassLoader overwrites opts. The object-assign module could be used for this. |
I mean, that two points for setting same options could lead to undesirable behavior with hard to find overrides if you load options for sassLoader from external module or just forgot, that option already set in sassLoader. Anyway it's better to make another PR for this. |
This may be a moot point because from what I can tell the
Update: got passing object as query param to work...duhI do agree with @jorrit that all keys should be merged, but I would say that those in Anyhow, it would be great to have this functionality. Not sure if @jhnns would be open to having a dependency on |
I had this issue several times (webpack-contrib/less-loader#40 peerigon/markdown-loader#8). While passing the options via query parameters is cumbersome, I don't think that it would be a good idea to pass-in all options via the webpack config. It seems straight-forward, but the full module path + query string is used as cache id afaik. Hence, two require calls with different loader configs are recognized to be different. What do you think about it @sokra? |
@sanniassin anyway, thx for your PR. I'm willing to merge this, but could you also add tests please? |
Nevermind... I'll do it, because we need a better setup for these kind of tests. |
Thanks, as i've never used mocha before :) |
@jhnns thanks for the help on this. I know it sucks for caching but seems like for complex config this is necessary in webpack |
@dtothefp It is necessary for options that can not be stringified using |
Shipped with |
Since version 3.0.0 node-sass supports custom functions, so it's gonna be great to use it with sass-loader