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

feat(gatsby-plugin-offline): Allow configuring Workbox debug mode #18123

Merged
merged 7 commits into from
Oct 10, 2019
Merged

feat(gatsby-plugin-offline): Allow configuring Workbox debug mode #18123

merged 7 commits into from
Oct 10, 2019

Conversation

vtenfys
Copy link
Contributor

@vtenfys vtenfys commented Oct 4, 2019

Description

Add new debug option to configure Workbox's debugging logs

Related Issues

Fixes #17782

@vtenfys vtenfys requested a review from a team as a code owner October 4, 2019 15:23
@vtenfys vtenfys requested a review from a team as a code owner October 4, 2019 15:40
@wardpeet
Copy link
Contributor

wardpeet commented Oct 9, 2019

Oh my, I didn't test it but it seems like we do lots of hacky stuff with workbox so i'm okay with approving after this is working. I wonder if we should switch to https://developers.google.com/web/tools/workbox/modules/workbox-build#injectmanifest instead of generateSw

@wardpeet wardpeet added the status: awaiting author response Additional information has been requested from the author label Oct 9, 2019
@vtenfys
Copy link
Contributor Author

vtenfys commented Oct 10, 2019

The reason we use generateSW rather than injectManifest is because the latter appends to a file, whereas we need to have the generated config at the top followed by our own options in order to have access to the Workbox global variables.

Also I wish there were a less hacky way of doing this, but Workbox doesn't allow configuring this option when using either generateSW or injectManifest :(

Copy link
Contributor

@m-allanson m-allanson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks @davidbailey00 👍

@m-allanson m-allanson merged commit 3c18b9f into gatsbyjs:master Oct 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: awaiting author response Additional information has been requested from the author
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Option to enable workbox debug output in gatsby-module-offline
3 participants