angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

esbuild builder is throwing css warning from third party packages

Open iKrishnaSahu opened this issue 10 months ago • 4 comments

Command

serve

Is this a regression?

  • [ ] Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

@angular-devkit/build-angular:browser-esbuild builder is throwing css warning from third party packages

I am using some private packages which has some styling related issues. We will fix it but the builder should not throw warning from third party package.

@angular-devkit/build-angular:browser is not throwing this warning

Minimal Reproduction

  • create new angular app with latest rc version (npx @angular/cli@next new)
  • go inside angular.json and update builder to @angular-devkit/build-angular:browser-esbuild. You will need to update browser to main
  • create a new style file in any third party package (this is just to reproduce the scenario as I did not find any public third party package with css related isuse) and add some style with issue and import that file inside angular.json's styles array

Exception or Error

Application bundle generation complete. [119.629 seconds]
Watch mode enabled. Watching for file changes...
  ➜  Local:   http://localhost:4200/
| Changes detected. Rebuilding...▲ [WARNING] Expected percentage but found "." [css-syntax-error]

    node_modules/@ruf/theme-plateau/dist/style-hybrid.css:5177:2:
      5177 │   .rc from {
           ╵   ^


▲ [WARNING] "overflow-1" is not a known CSS property [unsupported-css-property]

    node_modules/@ruf/theme-plateau/dist/style-hybrid.css:8006:2:
      8006 │   overflow-1: hidden;
           │   ~~~~~~~~~~
           ╵   overflow-y

  Did you mean "overflow-y" instead?


▲ [WARNING] Expected percentage but found "." [css-syntax-error]

    node_modules/@ruf/theme-plateau/dist/style-hybrid.css:8752:2:
      8752 │   .rc 0% {
           ╵   ^


▲ [WARNING] Expected percentage but found "." [css-syntax-error]

    node_modules/@ruf/theme-plateau/dist/style-hybrid.css:8773:2:
      8773 │   .rc 0% {
           ╵   ^

Your Environment

_                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/


Angular CLI: 17.0.0-rc.1
Node: 18.18.2
Package Manager: npm 8.19.3
OS: win32 x64

Angular: 17.0.0-rc.1
... animations, cdk, cli, common, compiler, compiler-cli, core
... elements, forms, localize, material, material-moment-adapter
... platform-browser, platform-browser-dynamic, router, upgrade

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1700.0-rc.1
@angular-devkit/build-angular   17.0.0-rc.1
@angular-devkit/core            17.0.0-rc.1
@angular-devkit/schematics      17.0.0-rc.1
@schematics/angular             16.2.7
ng-packagr                      16.2.3
rxjs                            7.8.1
typescript                      5.2.2
webpack                         5.89.0
zone.js                         0.14.0

Anything else relevant?

No response

iKrishnaSahu avatar Oct 26 '23 10:10 iKrishnaSahu

This is expected and these are warnings that the code is broken. It would be very hard to debug an app that is misbehaving otherwise.

We could however provide an option to hide warnings for third-party packages.

alan-agius4 avatar Nov 09 '23 14:11 alan-agius4

This feature request is now candidate for our backlog! In the next phase, the community has 60 days to upvote. If the request receives more than 20 upvotes, we'll move it to our consideration list.

You can find more details about the feature request process in our documentation.

angular-robot[bot] avatar Nov 10 '23 13:11 angular-robot[bot]

Just a heads up that we kicked off a community voting process for your feature request. There are 20 days until the voting process ends.

Find more details about Angular's feature request process in our documentation.

angular-robot[bot] avatar Dec 19 '23 13:12 angular-robot[bot]

Thank you for submitting your feature request! Looks like during the polling process it didn't collect a sufficient number of votes to move to the next stage.

We want to keep Angular rich and ergonomic and at the same time be mindful about its scope and learning journey. If you think your request could live outside Angular's scope, we'd encourage you to collaborate with the community on publishing it as an open source package.

You can find more details about the feature request process in our documentation.

angular-robot[bot] avatar Jan 08 '24 13:01 angular-robot[bot]