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

Incorrect format of "ignoreURLParametersMatching" values generated via workbox wizard cli command #2796

Closed
anuragl94 opened this issue Mar 29, 2021 · 2 comments · Fixed by #2802
Labels
Bug An issue with our existing, production codebase. workbox-cli

Comments

@anuragl94
Copy link

anuragl94 commented Mar 29, 2021

Library Affected:
workbox-cli

Browser & Platform:
Windows

Issue or Feature Request Description:
Running workbox wizard resulted in the following config file:

module.exports = {
  "globDirectory": "dist/",
  "globPatterns": [
    "**/*.{js,webmanifest,html,png,css}"
  ],
  "swDest": "dist/sw.js",
  "ignoreURLParametersMatching": [
    "/^utm_/",
    "/^fbclid$/"
  ]
};

Running workbox generateSW on this config file results in this error:

[1] "ignoreURLParametersMatching[0]" must be of type object

From the docs, it is clear that ignoreURLParametersMatching expects an array of Regular Expressions, not strings.
The wizard script should be fixed to reflect this.

@jeffposnick jeffposnick added Bug An issue with our existing, production codebase. workbox-cli labels Mar 31, 2021
@JSebastianOspina
Copy link

Same here

@jeffposnick
Copy link
Contributor

Thanks for reporting this; we have a PR out to fix it, but in the meantime, feel free to manually edit the config file to remove the " around the RegExps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug An issue with our existing, production codebase. workbox-cli
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants