angular.cli - Webpack compile scss to css

371 Views Asked by At

I'm using Angular-cli - Webpack and when I use ng-build , I see all scss files but not compiled css.

I expect that assets/styles/_default.scss will compile to assets/styles/_default.css

what can be the problem ?

thanks.

1

There are 1 best solutions below

0
Yalin On BEST ANSWER

a known issue. it will be fixed in next updates of angular-cli I think.

if you need to load .scss in runtime so you need to use this line:

require('style-loader!assets/styles/_default.scss');
  • you must install first type/node

    npm install --save @types/node

and add it to tsconfig file.