Angular-cli and Global SASS Variables
Netanel Basal
1005

Cool article! I believe there’s an even better way (when angular-cli lets you specify the required node-sass option).

In my angular.js webpack project i use the “data” option to include a variables stylesheet for every top-level stylesheet:

{
 loader: ‘sass-loader’,
 options: {
 data: `@import ‘variables’;`,
 includePaths: […],
 sourceMap: true
 }

That way you don’t have to repeat the variables.scss @import all over the place.

See https://github.com/angular/angular-cli/issues/1791#issuecomment-282282776