Skip to content

Rebuilding on 'ng serve'. Removed css-resource:src (build-angular:application)  #26918

Closed

Description

@p3t3r5

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

We have a large project that takes longer than a minute to start. We upgraded from version 16 to version 17.1.0 and switched to 'build-angular:application.' Every time we start, we get the message: 'Changes detected. Rebuilding...' and the entire project is rebuilded, taking a long time again. In verbose mode, I see that all CSS images are in the "removed" array. They are displayed, but rebuilding on serve is frustrating.

Minimal Reproduction

  • generate new project (ng new, SCSS)
  • apend new class to styles.scss
    .test-resource { display: inline-block; min-width: 3em; min-height: 3em; background-image: url(./assets/icon.png); background-size: contain; background-position: 50%; background-repeat: no-repeat; }
  • add some icon.png to src/assets
  • add new element to app.component.html
    <span class="test-resource"></span>
  • start app: ng serve --verbose
    Changes detected. Rebuilding... { "added": [], "modified": [], "removed": [ "...\\css-resource:src\\assets\\icon.png" ] No output file changes.

Exception or Error

No response

Your Environment

Angular CLI: 17.1.0
Node: 18.17.1
Package Manager: npm 10.3.0
OS: win32 x64

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

Package                         Version
---------------------------------------------------------       
@angular-devkit/architect       0.1701.0
@angular-devkit/build-angular   17.1.0
@angular-devkit/core            17.1.0
@angular-devkit/schematics      17.1.0
@schematics/angular             17.1.0
rxjs                            7.8.1
typescript                      5.3.3
zone.js                         0.14.3

Anything else relevant?

No response

Activity

  1. added a commit that references this issue on Jan 22, 2024
    4d4d90f
  2. self-assigned this
    on Jan 22, 2024
  3. p3t3r5 commented on Jan 22, 2024

    @p3t3r5
    Author

    Thank you for the quick fix :) We have many css resources (pictures/fonts) from other folders (thirdparty). I hope this path fixes them too.

    ...\\css-resource:node_modules\\@fortawesome\\...
    ...\\css-resource:vendor\\flags\\svg\\...

  4. alan-agius4 commented on Jan 22, 2024

    @alan-agius4
    Collaborator

    @p3t3r5, yes the fix handles all those.

  5. added 2 commits that reference this issue on Jan 22, 2024
    af1f0da
    aca1cfc
  6. angular-automatic-lock-bot commented on Feb 22, 2024

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  7. locked and limited conversation to collaborators on Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions