pwa-module
pwa-module copied to clipboard
runtimeCaching urlPattern and pagesURLPattern only accept strings
The urlPattern in runtimeCaching and the pageURLPattern 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.
+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.