Description
https://github.com/gatsbyjs/gatsby/pull/33484 introduced a regression where gatsby-plugin-sharp
doesn't init in engine and that result in errors on usage:
error Gatsby-plugin-sharp wasn't setup correctly in gatsby-config.js. Make sure you add it to the plugins array.
is getting bundled as
if (coreSupportsOnPluginInit) {
// to properly initialize plugin in worker (`onPreBootstrap` won't run in workers)
if (true) {} else {}
}
With this change it becomes
if (coreSupportsOnPluginInit) {
// to properly initialize plugin in worker (`onPreBootstrap` won't run in workers)
if (true) {
exports.onPluginInit = async ({
actions
}, pluginOptions) => {
setActions(actions);
setPluginOptions(pluginOptions);
};
} else {}
}