问题
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