-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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, gatsby-transformer-remark, gatsby-plugin-sharp): Cleanup v4 compile flag conditions #36486
Conversation
} | ||
exports.onPluginInit = async ({ actions }, pluginOptions) => { | ||
setActions(actions) | ||
setPluginOptions(pluginOptions) | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be used instead of the whole try catch
exports.onPluginInit = async ({ actions }, pluginOptions) => {
setActions(actions)
setPluginOptions(pluginOptions)
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean removing the if (coreSupportsOnPluginInit) {
check ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, small remarks.
Co-authored-by: Ward Peeters <[email protected]>
Description
In preparation for v5 canaries, This PR makes codepaths behind
_CFLAGS_.GATSBY_MAJOR === 4
conditions the default and also removes non_CFLAGS_.GATSBY_MAJOR === 4
codepaths.[sc-54975]