Angular CLI 7.2中不推荐使用vendorSourceMap [英] vendorSourceMap deprecated in Angular CLI 7.2
问题描述
从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屋!