Eliad Ayehu
Eliad Ayehu

Reputation: 125

angular.cli - Webpack compile scss to css

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.

Upvotes: 1

Views: 370

Answers (1)

Yalin
Yalin

Reputation: 355

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.

Upvotes: 1

Related Questions