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

chore(gatsby-plugin-offline): add pluginOptionsSchema export #27438

Merged
merged 5 commits into from
Oct 14, 2020
Merged

chore(gatsby-plugin-offline): add pluginOptionsSchema export #27438

merged 5 commits into from
Oct 14, 2020

Conversation

mfrachet
Copy link
Contributor

Description

Add plugin schema options in gatsby-plugin-offline

Relates to #27242 and https://www.gatsbyjs.com/plugins/gatsby-plugin-offline/

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Oct 14, 2020
Comment on lines +241 to +247
handler: Joi.string().valid(
`StaleWhileRevalidate`,
`CacheFirst`,
`NetworkFirst`,
`NetworkOnly`,
`CacheOnly`
),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

TIL: this is the way to deal with "enums" like options

Copy link
Contributor

Choose a reason for hiding this comment

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

We should definitely add this to the best practices documentation we're going to write!

@mfrachet mfrachet removed the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Oct 14, 2020
@mfrachet mfrachet marked this pull request as ready for review October 14, 2020 08:52
Copy link
Contributor

@mxstbr mxstbr left a comment

Choose a reason for hiding this comment

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

Amazing, thanks so much for tackling this!

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 this pull request may close these issues.

2 participants