Let's add Sass styles to our Angular project. We will configure our application to use Sass and automatically compile it to CSS and reload our application using live-reload:
- With sass-loader already available and ready to be used in our Angular-CLI project, we just need to configure Angular to look for .scss files in our project's build, instead of normal CSS files. We can do this using Angular-CLI's set command:
ng set defaults.styleExt scss
- Next, we must update our Angular-CLI configuration to define that we want to use this new Sass file extension for our build, instead of our previous CSS file extension. To update your configuration to use Sass for your global styles file, you must edit your styles configuration in ...