Skip to content

browser-esbuild builder doesn't clean output path before building #26308

Closed

Description

@atsjo

Command

build

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

16.2.10

Description

output path isn't cleared before building with @angular-devkit/build-angular:browser-esbuild, as it is with @angular-devkit/build-angular:application and @angular-devkit/build-angular:browser.

and setting deleteOutputPath=true doesn't work either...

this makes old build artifacts accumulate in the output, since chunks get a new hash for every change...

I could migrate to using application builder, but that puts the browser build in it's own sub-dir, with 3rdpartylicenses.txt in the parent folder (which is linked in my web-app)...

Minimal Reproduction

  1. setup project with browser-esbuild
  2. build
  3. make a change in the app
  4. build
  5. observe output with old hashed chunks

Exception or Error

No response

Your Environment

Angular CLI: 17.0.0
Node: 20.9.0
Package Manager: yarn <error>
OS: win32 x64

Angular: 17.0.2
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1700.0 (cli-only)
@angular-devkit/build-angular   17.0.0
@angular-devkit/core            17.0.0
@angular-devkit/schematics      17.0.0
@angular/cdk                    17.0.0
@angular/cli                    17.0.0
@angular/fire                   17.0.0-next.0
@angular/material               17.0.0
@schematics/angular             17.0.0
ng-packagr                      17.0.0
rxjs                            7.8.1
typescript                      5.1.6
zone.js                         0.14.2

Anything else relevant?

I'm using nx, and the reported Package Manager above is wrong...
Using the application builder works, but then I must manipulate the build output before deploying. The docs also states that deleteOutputPath can be set, but it's not working...

   Node   : 20.9.0
   OS     : win32-x64
   pnpm   : 8.10.2

   nx                 : 17.1.1
   @nx/js             : 17.1.1
   @nx/jest           : 17.1.1
   @nx/linter         : 17.1.1
   @nx/eslint         : 17.1.1
   @nx/workspace      : 17.1.1
   @nx/angular        : 17.1.1
   @nx/cypress        : 17.1.1
   @nx/devkit         : 17.1.1
   @nx/esbuild        : 17.1.1
   @nx/eslint-plugin  : 17.1.1
   @nrwl/tao          : 17.1.1
   @nx/web            : 17.1.1
   @nx/webpack        : 17.1.1
   typescript         : 5.1.6
   ---------------------------------------
   Community plugins:
   angular-calendar : 0.31.0

Activity

  1. atsjo commented on Nov 9, 2023

    @atsjo
    Author
  2. Char2sGu commented on Nov 9, 2023

    @Char2sGu

    Facing the same problem. The output is not deleted if "deleteOutputPath": true is explicitly specified.

  3. self-assigned this
    on Nov 10, 2023
  4. added 7 commits that reference this issue on Nov 10, 2023
    1db122f
    adc0db2
    4a20c18
    8a2978d
    9f5150e
    13f9d86
    5e4dcb8
  5. added 2 commits that reference this issue on Nov 13, 2023
    0003420
    15dd71a
  6. angular-automatic-lock-bot commented on Dec 14, 2023

    @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 Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area: @angular-devkit/build-angularfreq1: lowseverity5: regressiontype: bug/fix

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions