Skip to content

assets folder not working when using ng serve with --serve-path #26509

Closed

Description

@sbaeumlisberger

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

Angular 16 with webpack

Description

After update to Angular 17 and esbuild + vite assets no longer working when using ng serve with --serve-path option.

Minimal Reproduction

Just but some html file in the assets folder and run ng serve --serve-path /test. Than try to access "http://localhost:4200/test/somefile.html" and it will result in an 404 error. No output is logged.

Exception or Error

The server is configured with a public base URL of /test- did you mean to visit http://localhost:4200/test/@fs/C:%5CUsers%5C****************%5Csrc%5Cassets%5Csomefile.html instead?

Your Environment

Angular CLI: 17.0.3
Node: 18.15.0
Package Manager: npm 9.5.0
OS: win32 x64

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

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1700.3
@angular-devkit/build-angular   17.0.3
@angular-devkit/core            17.0.3
@angular-devkit/schematics      17.0.3
@angular/cli                    17.0.3
@schematics/angular             17.0.3
rxjs                            7.8.1
typescript                      5.2.2
zone.js                         0.14.2

Anything else relevant?

No response

Activity

  1. self-assigned this
    on Nov 28, 2023
  2. added 12 commits that reference this issue on Nov 28, 2023
    b12a239
    45f7c1a
    0544d82
    ce57b7b
    fb28a15
    5859b98
    4128634
    00bf4a8
    65ee520
    5805db1
    b7d526d
  3. added 2 commits that reference this issue on Nov 28, 2023
    150a2e7
    7455fdc
  4. angular-automatic-lock-bot commented on Dec 29, 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.

  5. locked and limited conversation to collaborators on Dec 29, 2023
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