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

谁说胖子不能爱 提交于 2019-12-23 03:47:05

问题


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.

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

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!


回答1:


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

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



来源:https://stackoverflow.com/questions/50862170/angular-6-devtools-failed-to-parse-sourcemap-https-example-com-ngsw-worker

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!