Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Karma builder: support sass in stylePreprocessorOptions with "builderMode: application" #29185

Open
cexbrayat opened this issue Dec 19, 2024 · 4 comments
Labels
area: @angular-devkit/build-angular devkit/build-angular:karma feature Issue that requests a new feature freq1: low Only reported by a handful of users who observe it rarely

Comments

@cexbrayat
Copy link
Member

Command

test

Description

It is currently impossible to define the sass option in stylePreprocessorOptions for the Karma builder, which makes it impossible to silence Sass deprecations with "builderMode: application."

"test": {
  "builder": "@angular-devkit/build-angular:karma",
  "options": {
  "builderMode": "application",
  "stylePreprocessorOptions": {
    "sass": {
      "silenceDeprecations": ["import"]
    }
  },

throws:

Error: Schema validation failed with the following errors:
  Data path "/stylePreprocessorOptions" must NOT have additional properties(sass).

Describe the solution you'd like

stylePreprocessorOptions allows to set includePaths but it would be great to handle sass options as well, like the application builder does.

Describe alternatives you've considered

No response

@alan-agius4
Copy link
Collaborator

This is similar to #28809, @jkrems up to you if you want to merge these 2 issues.

@bst-celum
Copy link

The same is true for the @angular-devkit/build-angular:browser builder which we are using through the @angular-builders/custom-webpack library. (https://github.com/just-jeb/angular-builders/tree/master/packages/custom-webpack#custom-webpack-browser)

@alan-agius4 is the recommendation in general to switch to build-angular:application, also for applications which will only run in the browser? Is there documentation for this switch (explanations, things-to-consider, etc.) - it would be very helpful in understanding why/what and how we can migrate.

@TokenR1ng
Copy link

TokenR1ng commented Jan 6, 2025

As stated in another issue, our project needs this feature in the @angular-devkit/build-angular:browser as well. Our project currently cannot migrate to the recommended application builder (which has this flag) and this small extension would really be helpful so that we can at least stay up-to-date with Angular versions. We need the stylePreprocessorOptions#sass option to suppress a lot of warnings comming from Bootstrap. Bootstrap itself will probably never fix this.

@Squixx
Copy link

Squixx commented Jan 7, 2025

As stated in another issue, our project needs this feature in the @angular-devkit/build-angular:browser as well. Our project currently cannot migrate to the recommended application builder (which has this flag) and this small extension would really be helpful so that we can at least stay up-to-date with Angular versions. We need the stylePreprocessorOptions#sass option to suppress a lot of warnings comming from Bootstrap. Bootstrap itself will probably never fix this.

the same is true for @angular-devkit/build-angular:browser-esbuild & even for @angular-devkit/build-angular:ng-packagr which means a lot of log spam when building multiple packages

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: @angular-devkit/build-angular devkit/build-angular:karma feature Issue that requests a new feature freq1: low Only reported by a handful of users who observe it rarely
Projects
None yet
Development

No branches or pull requests

5 participants