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

Support for .scss in the templateUrl #78

Closed
aelbore opened this issue Dec 1, 2016 · 1 comment
Closed

Support for .scss in the templateUrl #78

aelbore opened this issue Dec 1, 2016 · 1 comment

Comments

@aelbore
Copy link

aelbore commented Dec 1, 2016

Can i use .scss instead of .css on the templateUrl? Thanks

@aelbore
Copy link
Author

aelbore commented Dec 1, 2016

Heres a code ^^

import sass from 'node-sass';

styleProcessor: (stylePath, ext, styleFile, callback) => {
  if (ext[0] === '.scss') {
    let sassObj = sass.renderSync({ file: stylePath });
    if (sassObj && sassObj['css']){
      styleFile = sassObj.css.toString('utf8');
    }
  }
  return callback(null, styleFile);  
}  

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