Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ignoreURLParametersMatching not regex in cacheOptions #281

Open
danieltamas opened this issue Mar 30, 2020 · 1 comment · May be fixed by #437
Open

ignoreURLParametersMatching not regex in cacheOptions #281

danieltamas opened this issue Mar 30, 2020 · 1 comment · May be fixed by #437

Comments

@danieltamas
Copy link

danieltamas commented Mar 30, 2020

Version

v3.0.0-beta.19

Reproduction link

https://codesandbox.io/s/cranky-grothendieck-y4kyh

Steps to reproduce

in nuxt.config.js edit the pwa to contain ignoreURLParametersMatching ( this will be added at the option to precaching )

pwa: {
        cacheOptions: {
            cacheId: 'test',
            directoryIndex: '/',
            revision: timestamp,
            ignoreURLParametersMatching: [/.*/]
        },
}

npm run build

What is expected ?

ignoreURLParametersMatching: [/.*/]

What is actually happening?

ignoreURLParametersMatching: [{}]

Additional comments?

This breaks the preCache functionality when query strings exist in the requested file, throwing a 404 error from the service worker.

This bug report is available on Nuxt community (#c208)
@mihnayan
Copy link

mihnayan commented Oct 6, 2020

I have the same problem.
This happens to the fact that the JSON.stringify() is used during passed the options to the precacheAndRoute method in the workbox module.

@farnabaz farnabaz linked a pull request Mar 5, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants