Angular 6:DevTools无法解析SourceMap:https://example.com/ngsw_worker.es6.js.map [英] Angular 6 : DevTools failed to parse SourceMap: https://example.com/ngsw_worker.es6.js.map

查看:222
本文介绍了Angular 6:DevTools无法解析SourceMap:https://example.com/ngsw_worker.es6.js.map的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Angular CLI(ng add @ angular / pwa)将我的angular 6应用程序转换为PWA。我的目录中只有一个项目,因此我未指定项目名称就运行了此命令。

I converted my angular 6 application to PWA using the Angular CLI (ng add @angular/pwa). I only have one project in my directory and so I ran this command without specifying project name.

部署后,服务人员会注册-一切似乎都为了让我在google chrome控制台中收到以下错误:

After deployment, the service worker registers - and everything seems to be in order expect i get the following error in google chrome console:

DevTools无法解析SourceMap: https://example.com/ngsw_worker.es6 .js.map

DevTools failed to parse SourceMap: https://example.com/ngsw_worker.es6.js.map

此错误是什么意思?以及如何解决/避免这种情况?谢谢!

What does this error mean? And how can it be fixed/avoided? Thank you!

推荐答案

转到 angular.json 并设置所需的 sourceMap 配置为 true

Go to angular.json and set the desired sourceMap of configurations to true.

例如,遵循项目-> <项目名称> -> 建筑师- > 构建-> 配置-> 生产(或任何其他->并将 sourceMap:false 更改为 sourceMap:true

In example, follow projects -> <project-name> -> architect -> build -> configurations -> production (or any environment you are using) -> and change sourceMap: false to sourceMap: true.

这篇关于Angular 6:DevTools无法解析SourceMap:https://example.com/ngsw_worker.es6.js.map的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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