Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

vendorSourceMap deprecated in Angular CLI 7.2

Tags:

angular-cli

Starting with Angular 7.2, the vendorSourceMap option is deprecated:

> ng serve --vendor-source-map

Option "vendorSourceMap" is deprecated.

Official documentation of ng serve says vendorSourceMap is deprecated, but gives no alternative way of resolving library sources:

--vendorSourceMap=true|false

Deprecated

Resolve vendor packages sourcemaps.

Default: false

What is the correct, non-deprecated way, then to resolve vendor source maps in Angular 7.2?

like image 883
Markus Pscheidt Avatar asked Apr 15 '19 13:04

Markus Pscheidt


1 Answers

The correct angular.json options are

"serve": {
  "builder": "@angular-devkit/build-angular:dev-server",
  "options": {
    "sourceMap": {
      "scripts": true,
      "styles": true,
      "vendor": true
    },
...

Verified on 10.0.*. (Updated verfied version from 7.2.15 > 10.0.*)

Btw, the documentation is really poor on this matter, and I could not find a blog post or resource with an example.

like image 137
LppEdd Avatar answered Oct 17 '22 03:10

LppEdd