Angular CLI 7.2中不推荐使用vendorSourceMap [英] vendorSourceMap deprecated in Angular CLI 7.2

查看:334
本文介绍了Angular CLI 7.2中不推荐使用vendorSourceMap的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Angular 7.2开始,不推荐使用vendorSourceMap选项:

Starting with Angular 7.2, the vendorSourceMap option is deprecated:

> ng serve --vendor-source-map

Option "vendorSourceMap" is deprecated.

ng服务的官方文档说,vendorSourceMap已过时,但没有其他解决库的方法来源:

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

-vendorSourceMap = true | false

--vendorSourceMap=true|false

已弃用

解决供应商软件包的源映射.

Resolve vendor packages sourcemaps.

默认值:false

然后要在Angular 7.2中解析供应商源地图的正确,不建议过的方法是什么?

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

推荐答案

正确的angular.json选项是

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

10.0.*上验证. (从7.2.15> 10.0.*更新的验证版本)

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.

这篇关于Angular CLI 7.2中不推荐使用vendorSourceMap的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆