Mazlan Alam Malik
Mazlan Alam Malik

Reputation: 119

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!

Upvotes: 6

Views: 9101

Answers (1)

Pablo Navarro
Pablo Navarro

Reputation: 452

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.

Upvotes: 5

Related Questions