Closed huaxiaocheng closed 1 year ago
unavailable service worker for start_url when using basePath
next-pwa
next
Steps to reproduce the behavior:
basePath: "/hello"
<link rel="manifest" href="/hello/manifest.json" />
start_url: "/hello"
start_url: "/hello/"
refresh "localhost:3000/hello", use service work cache
https://github.com/shadowwalker/next-pwa/issues/305
Summary
unavailable service worker for start_url when using basePath
Versions
next-pwa
: latestnext
: latestHow To Reproduce
Steps to reproduce the behavior:
basePath: "/hello"
(basePath cannot end with "/" so it cannot be "/hello/")<link rel="manifest" href="/hello/manifest.json" />
start_url: "/hello"
, installable line will prompt "No matching service worker detected" and service worker does not workstart_url: "/hello/"
, no prompt but service worker does not work eitherExpected Behaviors
refresh "localhost:3000/hello", use service work cache