SASS & angular-cli setup
This is how to setup using the sass preprocessor in an angular 2 angular-cli project
Install the recommened packages
npm install node-sass --save-dev;
Add the compiler options to
return new Angular2App(defaults, {
// ...
sassCompiler: {
outputStyle: 'compressed',
}
//
}
Rename css files.
Now all files names *.sass or *.scss will be compiled and compressed into css
Update angular-cli's generator configuration
"defaults": {
// ...
"styleExt": "sass",
// ...
}