Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to pass SASS option to Angular library builder

I have an Angular 11 library using Bootstrap 4.5
ng-packagr uses SASS 1.34 which yields a lot of warning about the deprecation of the division operator, which is used a lot in Bootstrap (https://sass-lang.com/documentation/breaking-changes/slash-div)

The warning in question:

DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.

There is an option : --quiet-deps that can be used when manually executing sass, to hide these warnings.

My question is, how and where to pass this option when building the Angular library ?
It didn't find any possible configuration for the ng build command or in the ng-package.json file

like image 249
Mistic Avatar asked Jun 04 '21 12:06

Mistic


1 Answers

As far as the CLI release notes for 12.1.2 go this feature was added as a fix for this issue. By simply omitting --verbose from your build command should result in no warnings.

(Run npm list -g @angular/cli and npm list @angular-devkit/build-angular to see the versions you are using.)

like image 193
gwest7 Avatar answered Sep 21 '22 10:09

gwest7