Open gavmck opened 2 years ago
+1 on this, it actually says in the docs regex is supported: https://pwa.nuxtjs.org/workbox/#pagesurlpattern
But setting it like this will result in an empty string being passed to workbox:
pagesURLPattern: /^(?!\/auth).*$/
As I am trying to use a regex to exclude only some pages, I cannot get this to work with a string notation.
The
urlPattern
inruntimeCaching
and thepageURLPattern
option, both only accept strings.The docs for pagesURLPattern suggest it accepts either a string or a RegEx, but this does not work. There are no examples for a runtimeCaching object other than under "Adding custom runtimeCaching items for CDN".
Workbox itself accepts RegEx, string or match function.