Skip to content
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

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

Closed
1 task done
sbaeumlisberger opened this issue Nov 27, 2023 · 1 comment · Fixed by #26511
Closed
1 task done

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

sbaeumlisberger opened this issue Nov 27, 2023 · 1 comment · Fixed by #26511

Comments

@sbaeumlisberger
Copy link

sbaeumlisberger commented Nov 27, 2023

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

@alan-agius4 alan-agius4 self-assigned this Nov 28, 2023
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Nov 28, 2023
…erve-path`

When the `serve-path` option is used assets are now correctly servered from this location.

Closes angular#26509
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Nov 28, 2023
…erve-path`

When the `serve-path` option is used assets are now correctly servered from this location.

Closes angular#26509
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Nov 28, 2023
…erve-path`

When the `serve-path` option is used assets are now correctly servered from this location.

Closes angular#26509
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Nov 28, 2023
…erve-path`

When the `serve-path` option is used assets are now correctly servered from this location.

Closes angular#26509
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Nov 28, 2023
…erve-path`

When the `serve-path` option is used assets are now correctly servered from this location.

Closes angular#26509
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Nov 28, 2023
…erve-path`

When the `serve-path` option is used assets are now correctly servered from this location.

Closes angular#26509
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Nov 28, 2023
…erve-path`

When the `serve-path` option is used assets are now correctly servered from this location.

Closes angular#26509
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Nov 28, 2023
…erve-path`

When the `serve-path` option is used assets are now correctly servered from this location.

Closes angular#26509
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Nov 28, 2023
…erve-path`

When the `serve-path` option is used assets are now correctly servered from this location.

Closes angular#26509
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Nov 28, 2023
…erve-path`

When the `serve-path` option is used assets are now correctly servered from this location.

Closes angular#26509
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Nov 28, 2023
…erve-path`

When the `serve-path` option is used assets are now correctly servered from this location.

Closes angular#26509
alan-agius4 added a commit that referenced this issue Nov 28, 2023
…erve-path`

When the `serve-path` option is used assets are now correctly servered from this location.

Closes #26509
alan-agius4 added a commit that referenced this issue Nov 28, 2023
…erve-path`

When the `serve-path` option is used assets are now correctly servered from this location.

Closes #26509

(cherry picked from commit 150a2e7)
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Dec 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
2 participants