An unknown error occurred when fetching the script (Service Worker)

前端 未结 5 875
温柔的废话
温柔的废话 2021-02-12 17:28

When going offline, I get the following error by my service worker:

(unknown) #3016 An unknown error occurred when fetching the script

my service w

5条回答
  •  别那么骄傲
    2021-02-12 18:30

    I had this issue while working in an Angular project. My problem was that I was using Angular CLI's built-in ng serve -prod command.

    To make it work, I used ng build -prod and then host the resulting dist folder using http-server

提交回复
热议问题