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

Missing component sourcemaps with JIT and CLI cache enabled #29697

Open
1 task done
urrang opened this issue Feb 24, 2025 · 1 comment
Open
1 task done

Missing component sourcemaps with JIT and CLI cache enabled #29697

urrang opened this issue Feb 24, 2025 · 1 comment

Comments

@urrang
Copy link

urrang commented Feb 24, 2025

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

18.2.3

Description

We have a large Angular app, and for the time being we're using JIT mode during local development for faster change-reload cycles.

Since upgrading to Angular 19 we've noticed component sourcemaps are missing in the Sources panel of the browser dev tool. When placing debugger statements in our code the browser just points at the end of the component template. This is not a problem when AOT is enabled.

I noticed after some debugging that disabling the Angular CLI cache resolves the problem. Running ng cache clean or removing the .angular directory and restarting the dev server (with caching) does not help. Caching needs to be completely disabled for sourcemaps to work.

Caching enabled:

Image

Caching disabled:

Image

Minimal Reproduction

https://github.com/urrang/ng19-sourcemap-repro

Command: ng serve

The repro app has a debugger statement in the button's click handler. On the main branch the problem should be reproducible. On the cache-disabled branch CLI's cache has been disabled and the debugger should work as expected.

Exception or Error


Your Environment

Angular CLI: 19.1.8
Node: 22.13.1
Package Manager: npm 10.9.2
OS: darwin arm64

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

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

Anything else relevant?

No response

@urrang
Copy link
Author

urrang commented Feb 24, 2025

Just noticed this is probably a duplicate of #29656. Sorry about that, I must have only looked for existing issues on the angular repo, not angular-cli. Leaving this up for now since it contains a bit more info, but feel free to close it.

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

No branches or pull requests

1 participant