Service Worker registration error: Unsupported MIME type ('text/html')

前端 未结 12 1269
梦如初夏
梦如初夏 2020-12-05 17:44

I\'m using create-react-app with an express server.

create-react-app has a pre-configured ServiceWorker that caches local assets (https://github.com/fac

12条回答
  •  既然无缘
    2020-12-05 18:22

    In case, you're working on with NodeJS, serviceWorker file should place at public folder. If you're using Webpack to export serviceWorker to public, you need to use 'copy-webpack-plugin'.

提交回复
热议问题