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

Q: how to pass custom options to the sass loader #187

Closed
krvajal opened this issue Aug 6, 2019 · 2 comments
Closed

Q: how to pass custom options to the sass loader #187

krvajal opened this issue Aug 6, 2019 · 2 comments

Comments

@krvajal
Copy link

krvajal commented Aug 6, 2019

I need to pass custom options to the node-sass loader. Is it possible to achieve it?
Specifically, I want to define custom functions as explained here.
https://github.com/sass/node-sass/blob/master/README.md#functions--v300---experimental.

I know I can define functions with postcss but I need them to execute earlier, when the sass processing is happening.

@calledT
Copy link

calledT commented Aug 9, 2019

The use options allow you config loader's options.

example

// rollup.config.js
import postcss from 'rollup-plugin-postcss';

export default {
  ...
  plugins: [
    postcss:({ use: [['sass', { importer: [someOtherImporter] }]] })
  ]
};

@krvajal
Copy link
Author

krvajal commented Aug 11, 2019

Thx, works nicely

@krvajal krvajal closed this as completed Aug 11, 2019
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