No sourcemaps generated for 'ng serve' with angular-cli 1.5.2
See original GitHub issueSourcemaps stopped working for dev builds using ng serve
in my app after upgrading to angular-cli 1.5.
I tested this by creating a pristine project and the same thing happens, there seem to be no sourcemaps available over the development server. A regular ng build
does create the .map files.
Versions
Angular CLI: 1.5.2
Node: 8.4.0
OS: win32 x64
Angular: 5.0.2
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router
@angular/cli: 1.5.2
@angular-devkit/build-optimizer: 0.0.33
@angular-devkit/core: 0.0.20
@angular-devkit/schematics: 0.0.36
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.8.2
@schematics/angular: 0.1.5
typescript: 2.4.2
webpack: 3.8.1
Repro steps
- Step 1
npm install -g @angular/cli
- Step 2
ng g test-app
cd test-app
- Step 3
ng serve
Observed behavior
No sourcemaps are availbale over the dev server. e.g. http://localhost:4200/main.bundle.js.map -> 404 not found
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:19 (5 by maintainers)
Top Results From Across the Web
Angular 11 - ng serve - Option "sourceMap" is deprecated
Option "sourceMap" is deprecated: Use the "sourceMap" option in the browser builder instead. The warning is not presented in ng build . Here...
Read more >Configuring sourcemaps with the Angular CLI
You can configure sourcemaps generation for the different targets (e.g., serve, production, etc) through the angular.json file: ... "architect": ...
Read more >Chapter 1. Introducing Angular - liveBook · Manning
Generate a new single-page web app in seconds using Angular CLI ... The ng serve command builds the bundles in memory without generating...
Read more >Compare Versions | tnp-models | npm - Open Source Insights
We found errors while resolving dependencies that may result in an incomplete or inaccurate dependency graph. Show details. Errors found while resolving some ......
Read more >www.sing-group.org/dt/gitlab/mrjato/daaexample/com...
+ +## Further help + +To get more help on the Angular CLI use `ng help` or go ... No newline at end...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks @clydin, the browser debugger (Chrome or Firefox) does not seem to pick up these integrated source maps and just displays the minified code. I’m not sure how to go about debugging the code, setting breakpoints etc. Any suggestions would be much appreciated.
@filipesilva, the workaround of using sources under the
webpack://
node is working in Chrome/FF, but it isn’t great because ‘Search all sources’ doesn’t work. You have to navigatewebpack://
tree every time you need to set a breakpoint instead of quickly searching for desired line across your project in browser’s DevTools.