Skip to content

No compilation errors for non-existing css files referred in component's styleUrl/styleUrls #29887

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

Closed
sd-git opened this issue Mar 19, 2025 · 0 comments · Fixed by #29888
Closed

Comments

@sd-git
Copy link

sd-git commented Mar 19, 2025

Which @angular/* package(s) are the source of the bug?

Don't known / other

Is this a regression?

Yes

Description

When using @angular-devkit/build-angular:application in new Angular there seems to be no check for existence of css files referred from the component.

To replicate, create empty project using the latest Angular, then edit src/app/app.component.ts and change .css file path to non-existing file or any string.

After that both ng serve and ng build still run successfully without any complains/warnings.

Unit tests ng test is failing (probably because it's still using webpack)

Please provide a link to a minimal reproduction of the bug

No response

Please provide the exception or error you saw


Please provide the environment you discovered this bug in (run ng version)

Angular CLI: 19.2.3
Node: 18.20.6
Package Manager: npm 10.8.2
OS: linux x64

Angular: 19.2.2
... common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1902.3
@angular-devkit/build-angular   19.2.3
@angular-devkit/core            19.2.3
@angular-devkit/schematics      19.2.3
@angular/cli                    19.2.3
@schematics/angular             19.2.3
rxjs                            7.8.2
typescript                      5.7.3
zone.js                         0.15.0

Anything else?

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant