Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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!

like image 243
Mazlan Alam Malik Avatar asked Jun 14 '18 16:06

Mazlan Alam Malik


1 Answers

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.

like image 109
Pablo Navarro Avatar answered Nov 14 '22 09:11

Pablo Navarro