You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to include some deprecation warnings in a PR I'm working on for gatsby-source-wordpress -- it seems like onPreInit could be a good place to check user-specified configuration options, but it's not clear to me if the config options are available to this step. How can I achieve something like the following:
constreport=require(`gatsby-cli/lib/reporter`)exports.onPreInit=async({ userConfig })=>{if(userConfig.useACF){report.warn(`ACF functionality will be removed from gatsby-source-wordpress v4. Please migrate to gatsby-wordpress-acf.`)}}
The text was updated successfully, but these errors were encountered:
Thanks @m-allanson, confirming this works perfectly inside gatsby-node.js:
constreport=require(`gatsby-cli/lib/reporter`)exports.onPreBootstrap=({},pluginOptions)=>{if(pluginOptions.useACF){report.warn(`\n\nACF functionality will be removed from gatsby-source-wordpress v4. Please migrate to gatsby-wordpress-acf.\n\n`)}}
I'd like to include some deprecation warnings in a PR I'm working on for
gatsby-source-wordpress
-- it seems likeonPreInit
could be a good place to check user-specified configuration options, but it's not clear to me if the config options are available to this step. How can I achieve something like the following:The text was updated successfully, but these errors were encountered: