You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently I receive the following browser error with my SPA setup:
Uncaught incorrect-type: The parameter 'cachedAssetUrl' passed into 'workbox-routing.registerNavigationRoute()' must be of type string.
at Object.isType (http://localhost:8080/bundle/workbox/workbox-v4.3.1/workbox-core.dev.js:457:13)
at Object.registerNavigationRoute (http://localhost:8080/bundle/workbox/workbox-v4.3.1/workbox-routing.dev.js:814:25)
at http://localhost:8080/workbox.js:39:17
Library Affected:
[email protected]
,GenerateSW
Browser & Platform:
n/a
Issue or Feature Request Description:
Currently I receive the following browser error with my SPA setup:
This is my current setup in
webpack
:The problem is in the generated
workbox.js
:.getCacheKeyForURL()
is returningundefined
. The precache key shouldn't have the the leading forward slash. Everything works if I remove it:In searching I noticed the following PR #1874 which uses
navigateFallback
for the cache key. Perhaps this should instead be usingdirectoryIndex
?I also see that
registerNavigationRoute()
has been deprecated, so perhaps this issue is late and can be ignored. I will test the next@5.0-alpha
when #2143 is merged.The text was updated successfully, but these errors were encountered: